@egain/egain-mcp-server 1.0.21 → 1.0.22
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/bin/mcp-server.js +294 -114
- package/bin/mcp-server.js.map +40 -34
- package/esm/src/funcs/queryAnswers.d.ts +7 -3
- package/esm/src/funcs/queryAnswers.d.ts.map +1 -1
- package/esm/src/funcs/queryAnswers.js +9 -7
- package/esm/src/funcs/queryAnswers.js.map +1 -1
- package/esm/src/funcs/queryRetrieve.d.ts +2 -2
- package/esm/src/funcs/queryRetrieve.d.ts.map +1 -1
- package/esm/src/funcs/queryRetrieve.js +4 -10
- package/esm/src/funcs/queryRetrieve.js.map +1 -1
- package/esm/src/funcs/querySearch.d.ts +3 -3
- package/esm/src/funcs/querySearch.d.ts.map +1 -1
- package/esm/src/funcs/querySearch.js +9 -3
- package/esm/src/funcs/querySearch.js.map +1 -1
- package/esm/src/hooks/server-routing-hook.js +2 -2
- package/esm/src/hooks/server-routing-hook.js.map +1 -1
- package/esm/src/lib/config.d.ts +2 -2
- package/esm/src/lib/config.js +2 -2
- package/esm/src/mcp-server/mcp-server.js +1 -1
- package/esm/src/mcp-server/server.js +4 -4
- package/esm/src/mcp-server/server.js.map +1 -1
- package/esm/src/mcp-server/tools/queryAnswers.d.ts +1 -1
- package/esm/src/mcp-server/tools/queryAnswers.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/queryAnswers.js +7 -3
- package/esm/src/mcp-server/tools/queryAnswers.js.map +1 -1
- package/esm/src/mcp-server/tools/queryRetrieve.d.ts +1 -1
- package/esm/src/mcp-server/tools/queryRetrieve.js +2 -2
- package/esm/src/mcp-server/tools/queryRetrieve.js.map +1 -1
- package/esm/src/mcp-server/tools/querySearch.js +1 -1
- package/esm/src/models/additionalsnippets.d.ts +2 -1
- package/esm/src/models/additionalsnippets.d.ts.map +1 -1
- package/esm/src/models/additionalsnippets.js +2 -1
- package/esm/src/models/additionalsnippets.js.map +1 -1
- package/esm/src/models/aisearchop.d.ts +8 -4
- package/esm/src/models/aisearchop.d.ts.map +1 -1
- package/esm/src/models/aisearchop.js +16 -6
- package/esm/src/models/aisearchop.js.map +1 -1
- package/esm/src/models/aisearchresponse.d.ts +16 -0
- package/esm/src/models/aisearchresponse.d.ts.map +1 -0
- package/esm/src/models/aisearchresponse.js +14 -0
- package/esm/src/models/aisearchresponse.js.map +1 -0
- package/esm/src/models/aispaginationinfo.d.ts +10 -0
- package/esm/src/models/aispaginationinfo.d.ts.map +1 -0
- package/esm/src/models/aispaginationinfo.js +12 -0
- package/esm/src/models/aispaginationinfo.js.map +1 -0
- package/esm/src/models/aitopicbreadcrumb.d.ts +10 -0
- package/esm/src/models/aitopicbreadcrumb.d.ts.map +1 -0
- package/esm/src/models/aitopicbreadcrumb.js +9 -0
- package/esm/src/models/aitopicbreadcrumb.js.map +1 -0
- package/esm/src/models/aitopicsummary.d.ts +10 -0
- package/esm/src/models/aitopicsummary.d.ts.map +1 -0
- package/esm/src/models/aitopicsummary.js +9 -0
- package/esm/src/models/aitopicsummary.js.map +1 -0
- package/esm/src/models/answersrequest.d.ts +22 -11
- package/esm/src/models/answersrequest.d.ts.map +1 -1
- package/esm/src/models/answersrequest.js +22 -10
- package/esm/src/models/answersrequest.js.map +1 -1
- package/esm/src/models/answersresponse.d.ts +3 -2
- package/esm/src/models/answersresponse.d.ts.map +1 -1
- package/esm/src/models/answersresponse.js +2 -1
- package/esm/src/models/answersresponse.js.map +1 -1
- package/esm/src/models/article.d.ts +1 -1
- package/esm/src/models/article.d.ts.map +1 -1
- package/esm/src/models/articleaisearchresult.d.ts +58 -0
- package/esm/src/models/articleaisearchresult.d.ts.map +1 -0
- package/esm/src/models/articleaisearchresult.js +63 -0
- package/esm/src/models/articleaisearchresult.js.map +1 -0
- package/esm/src/models/articletype.d.ts +1 -1
- package/esm/src/models/articletype.d.ts.map +1 -1
- package/esm/src/models/articletype.js +1 -0
- package/esm/src/models/articletype.js.map +1 -1
- package/esm/src/models/createsuggestion.d.ts +1 -1
- package/esm/src/models/createsuggestion.d.ts.map +1 -1
- package/esm/src/models/createsuggestion.js +13 -1
- package/esm/src/models/createsuggestion.js.map +1 -1
- package/esm/src/models/getbestanswerop.d.ts +24 -0
- package/esm/src/models/getbestanswerop.d.ts.map +1 -0
- package/esm/src/models/getbestanswerop.js +30 -0
- package/esm/src/models/getbestanswerop.js.map +1 -0
- package/esm/src/models/languagecodeparameter.d.ts +1 -1
- package/esm/src/models/languagecodeparameter.d.ts.map +1 -1
- package/esm/src/models/languagecodeparameter.js +11 -0
- package/esm/src/models/languagecodeparameter.js.map +1 -1
- package/esm/src/models/languagequeryparameter.d.ts +1 -1
- package/esm/src/models/languagequeryparameter.d.ts.map +1 -1
- package/esm/src/models/languagequeryparameter.js +11 -0
- package/esm/src/models/languagequeryparameter.js.map +1 -1
- package/esm/src/models/mandatorylanguagequeryparameter.d.ts +1 -1
- package/esm/src/models/mandatorylanguagequeryparameter.d.ts.map +1 -1
- package/esm/src/models/mandatorylanguagequeryparameter.js +12 -0
- package/esm/src/models/mandatorylanguagequeryparameter.js.map +1 -1
- package/esm/src/models/referenceresponse.d.ts +2 -2
- package/esm/src/models/referenceresponse.d.ts.map +1 -1
- package/esm/src/models/referenceresponse.js +2 -2
- package/esm/src/models/referenceresponse.js.map +1 -1
- package/esm/src/models/requiredlanguagecode.d.ts +7 -0
- package/esm/src/models/requiredlanguagecode.d.ts.map +1 -0
- package/esm/src/models/requiredlanguagecode.js +41 -0
- package/esm/src/models/requiredlanguagecode.js.map +1 -0
- package/esm/src/models/retrievechunksop.d.ts +24 -0
- package/esm/src/models/retrievechunksop.d.ts.map +1 -0
- package/esm/src/models/retrievechunksop.js +30 -0
- package/esm/src/models/retrievechunksop.js.map +1 -0
- package/esm/src/models/retrieverequest.d.ts +1 -0
- package/esm/src/models/retrieverequest.d.ts.map +1 -1
- package/esm/src/models/retrieverequest.js +1 -0
- package/esm/src/models/retrieverequest.js.map +1 -1
- package/esm/src/models/retrieveresponse.d.ts +2 -1
- package/esm/src/models/retrieveresponse.d.ts.map +1 -1
- package/esm/src/models/retrieveresponse.js +2 -1
- package/esm/src/models/retrieveresponse.js.map +1 -1
- package/esm/src/models/schemastags.d.ts +7 -0
- package/esm/src/models/schemastags.d.ts.map +1 -0
- package/esm/src/models/schemastags.js +9 -0
- package/esm/src/models/schemastags.js.map +1 -0
- package/esm/src/models/searchresult.d.ts +6 -4
- package/esm/src/models/searchresult.d.ts.map +1 -1
- package/esm/src/models/searchresult.js +7 -5
- package/esm/src/models/searchresult.js.map +1 -1
- package/esm/src/models/tags.d.ts +2 -2
- package/esm/src/models/tags.d.ts.map +1 -1
- package/esm/src/models/tags.js +2 -2
- package/esm/src/models/tags.js.map +1 -1
- package/esm/src/models/topicsummary.d.ts +2 -0
- package/esm/src/models/topicsummary.d.ts.map +1 -1
- package/esm/src/models/topicsummary.js +2 -0
- package/esm/src/models/topicsummary.js.map +1 -1
- package/esm/src/models/wserrorcommon.d.ts +1 -1
- package/esm/src/models/wserrorcommon.d.ts.map +1 -1
- package/esm/src/models/wserrorcommon.js +1 -1
- package/esm/src/models/wserrorcommon.js.map +1 -1
- package/manifest.json +12 -12
- package/package.json +1 -1
- package/src/funcs/queryAnswers.ts +20 -18
- package/src/funcs/queryRetrieve.ts +15 -21
- package/src/funcs/querySearch.ts +16 -9
- package/src/hooks/server-routing-hook.ts +2 -2
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +4 -4
- package/src/mcp-server/tools/queryAnswers.ts +7 -3
- package/src/mcp-server/tools/queryRetrieve.ts +2 -2
- package/src/mcp-server/tools/querySearch.ts +1 -1
- package/src/models/additionalsnippets.ts +4 -2
- package/src/models/aisearchop.ts +33 -9
- package/src/models/aisearchresponse.ts +42 -0
- package/src/models/aispaginationinfo.ts +24 -0
- package/src/models/aitopicbreadcrumb.ts +21 -0
- package/src/models/aitopicsummary.ts +24 -0
- package/src/models/answersrequest.ts +42 -23
- package/src/models/answersresponse.ts +5 -3
- package/src/models/article.ts +1 -1
- package/src/models/{articlesearchresult.ts → articleaisearchresult.ts} +39 -37
- package/src/models/articletype.ts +1 -0
- package/src/models/createsuggestion.ts +13 -1
- package/src/models/{postportalidanswersop.ts → getbestanswerop.ts} +19 -12
- package/src/models/languagecodeparameter.ts +11 -0
- package/src/models/languagequeryparameter.ts +11 -0
- package/src/models/mandatorylanguagequeryparameter.ts +12 -0
- package/src/models/referenceresponse.ts +5 -5
- package/src/models/requiredlanguagecode.ts +48 -0
- package/src/models/{postportalidretrieveop.ts → retrievechunksop.ts} +19 -15
- package/src/models/retrieverequest.ts +2 -0
- package/src/models/retrieveresponse.ts +4 -2
- package/src/models/schemastags.ts +19 -0
- package/src/models/searchresult.ts +13 -9
- package/src/models/tag.ts +12 -0
- package/src/models/tags.ts +3 -6
- package/src/models/topicsummary.ts +3 -0
- package/src/models/wserrorcommon.ts +2 -2
- package/src/models/searchresponse.ts +0 -34
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
AISPaginationInfo,
|
|
8
|
+
AISPaginationInfo$zodSchema,
|
|
9
|
+
} from "./aispaginationinfo.js";
|
|
10
|
+
import {
|
|
11
|
+
ArticleAISearchResult,
|
|
12
|
+
ArticleAISearchResult$zodSchema,
|
|
13
|
+
} from "./articleaisearchresult.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Top search results with relevance scores
|
|
17
|
+
*/
|
|
18
|
+
export type SearchResults = {
|
|
19
|
+
article?: Array<ArticleAISearchResult> | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const SearchResults$zodSchema: z.ZodType<
|
|
23
|
+
SearchResults,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
article: z.array(ArticleAISearchResult$zodSchema).optional(),
|
|
28
|
+
}).describe("Top search results with relevance scores");
|
|
29
|
+
|
|
30
|
+
export type AISearchResponse = {
|
|
31
|
+
searchResults: SearchResults;
|
|
32
|
+
paginationInfo?: AISPaginationInfo | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const AISearchResponse$zodSchema: z.ZodType<
|
|
36
|
+
AISearchResponse,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
paginationInfo: AISPaginationInfo$zodSchema.optional(),
|
|
41
|
+
searchResults: z.lazy(() => SearchResults$zodSchema),
|
|
42
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { Link, Link$zodSchema } from "./link.js";
|
|
7
|
+
|
|
8
|
+
export type AISPaginationInfo = {
|
|
9
|
+
count?: number | undefined;
|
|
10
|
+
pagenum?: number | undefined;
|
|
11
|
+
pagesize?: number | undefined;
|
|
12
|
+
link?: Array<Link> | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const AISPaginationInfo$zodSchema: z.ZodType<
|
|
16
|
+
AISPaginationInfo,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
count: z.number().int().default(1),
|
|
21
|
+
link: z.array(Link$zodSchema).optional(),
|
|
22
|
+
pagenum: z.number().int().default(1),
|
|
23
|
+
pagesize: z.number().int().default(20),
|
|
24
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { AITopicSummary, AITopicSummary$zodSchema } from "./aitopicsummary.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This schema contains one or more TopicSummary instances.
|
|
10
|
+
*/
|
|
11
|
+
export type AITopicBreadcrumb = {
|
|
12
|
+
topicSummary?: Array<AITopicSummary> | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const AITopicBreadcrumb$zodSchema: z.ZodType<
|
|
16
|
+
AITopicBreadcrumb,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
topicSummary: z.array(AITopicSummary$zodSchema).optional(),
|
|
21
|
+
}).describe("This schema contains one or more TopicSummary instances.");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This schema contains the topic ID and name of the topics. This is used by TopicBreadcrumb.
|
|
9
|
+
*/
|
|
10
|
+
export type AITopicSummary = {
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const AITopicSummary$zodSchema: z.ZodType<
|
|
16
|
+
AITopicSummary,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
id: z.string().optional(),
|
|
21
|
+
name: z.string().optional(),
|
|
22
|
+
}).describe(
|
|
23
|
+
"This schema contains the topic ID and name of the topics. This is used by TopicBreadcrumb.",
|
|
24
|
+
);
|
|
@@ -5,17 +5,39 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Optional channel type. Defaults to "portal" if omitted.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Accepts "portal" or "custom". Only include if channel object is provided.
|
|
9
12
|
*/
|
|
10
13
|
export const AnswersRequestType$zodSchema = z.enum([
|
|
11
14
|
"portal",
|
|
12
15
|
"custom",
|
|
13
16
|
]).describe(
|
|
14
|
-
"
|
|
17
|
+
"Optional channel type. Defaults to \"portal\" if omitted. \n"
|
|
18
|
+
+ "Accepts \"portal\" or \"custom\". Only include if channel object is provided.\n"
|
|
19
|
+
+ "",
|
|
15
20
|
);
|
|
16
21
|
|
|
17
22
|
export type AnswersRequestType = z.infer<typeof AnswersRequestType$zodSchema>;
|
|
18
23
|
|
|
24
|
+
/**
|
|
25
|
+
* **Optional** channel information. **Recommended: Omit this field** unless specifically needed.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
*
|
|
29
|
+
* **Important Notes:**
|
|
30
|
+
* - The API works reliably without this field (defaults are applied automatically)
|
|
31
|
+
* - Including channel may cause validation errors (400 Bad Request) in some cases
|
|
32
|
+
* - If you receive a 400 error when including channel, retry the request without it
|
|
33
|
+
* - When channel is provided, both type and name are optional, but name should be non-empty if provided
|
|
34
|
+
*
|
|
35
|
+
* **Working examples:**
|
|
36
|
+
* - Omit channel entirely (recommended)
|
|
37
|
+
* - channel: {type: "portal", name: "portal"}
|
|
38
|
+
* - channel: {type: "custom", name: "test"}
|
|
39
|
+
* - channel: {name: "portal"} (type defaults to "portal")
|
|
40
|
+
*/
|
|
19
41
|
export type AnswersRequestChannel = {
|
|
20
42
|
type?: AnswersRequestType | undefined;
|
|
21
43
|
name?: string | undefined;
|
|
@@ -28,30 +50,27 @@ export const AnswersRequestChannel$zodSchema: z.ZodType<
|
|
|
28
50
|
> = z.object({
|
|
29
51
|
name: z.string().default("portal"),
|
|
30
52
|
type: AnswersRequestType$zodSchema.default("portal"),
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}).describe(
|
|
48
|
-
"Additional contextual metadata that enriches the query, providing the LLM with relevant details for tailoring the response.",
|
|
49
|
-
);
|
|
53
|
+
}).describe(
|
|
54
|
+
"**Optional** channel information. **Recommended: Omit this field** unless specifically needed.\n"
|
|
55
|
+
+ "\n"
|
|
56
|
+
+ "**Important Notes:**\n"
|
|
57
|
+
+ "- The API works reliably without this field (defaults are applied automatically)\n"
|
|
58
|
+
+ "- Including channel may cause validation errors (400 Bad Request) in some cases\n"
|
|
59
|
+
+ "- If you receive a 400 error when including channel, retry the request without it\n"
|
|
60
|
+
+ "- When channel is provided, both type and name are optional, but name should be non-empty if provided\n"
|
|
61
|
+
+ "\n"
|
|
62
|
+
+ "**Working examples:**\n"
|
|
63
|
+
+ "- Omit channel entirely (recommended)\n"
|
|
64
|
+
+ "- channel: {type: \"portal\", name: \"portal\"}\n"
|
|
65
|
+
+ "- channel: {type: \"custom\", name: \"test\"}\n"
|
|
66
|
+
+ "- channel: {name: \"portal\"} (type defaults to \"portal\")\n"
|
|
67
|
+
+ "",
|
|
68
|
+
);
|
|
50
69
|
|
|
51
70
|
export type AnswersRequest = {
|
|
52
71
|
channel?: AnswersRequestChannel | undefined;
|
|
53
|
-
context?: Context | undefined;
|
|
54
72
|
eventId: string;
|
|
73
|
+
clientSessionId?: string | undefined;
|
|
55
74
|
sessionId: string;
|
|
56
75
|
};
|
|
57
76
|
|
|
@@ -61,7 +80,7 @@ export const AnswersRequest$zodSchema: z.ZodType<
|
|
|
61
80
|
unknown
|
|
62
81
|
> = z.object({
|
|
63
82
|
channel: z.lazy(() => AnswersRequestChannel$zodSchema).optional(),
|
|
64
|
-
|
|
83
|
+
clientSessionId: z.string().optional(),
|
|
65
84
|
eventId: z.string(),
|
|
66
85
|
sessionId: z.string(),
|
|
67
86
|
});
|
|
@@ -27,7 +27,7 @@ export type AnswersResponseAnswer = {
|
|
|
27
27
|
answerValue: string;
|
|
28
28
|
references: Array<ReferenceResponse>;
|
|
29
29
|
answerType: AnswersResponseAnswerType;
|
|
30
|
-
relevanceScore
|
|
30
|
+
relevanceScore?: number | undefined;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const AnswersResponseAnswer$zodSchema: z.ZodType<
|
|
@@ -38,7 +38,7 @@ export const AnswersResponseAnswer$zodSchema: z.ZodType<
|
|
|
38
38
|
answerType: AnswersResponseAnswerType$zodSchema,
|
|
39
39
|
answerValue: z.string(),
|
|
40
40
|
references: z.array(ReferenceResponse$zodSchema),
|
|
41
|
-
relevanceScore: z.number(),
|
|
41
|
+
relevanceScore: z.number().optional(),
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -71,8 +71,9 @@ export type AnswersResponse = {
|
|
|
71
71
|
answer: AnswersResponseAnswer;
|
|
72
72
|
searchResults: Array<SearchResult>;
|
|
73
73
|
channel?: AnswersResponseChannel | undefined;
|
|
74
|
-
sessionId: string;
|
|
75
74
|
eventId?: string | undefined;
|
|
75
|
+
clientSessionId?: string | undefined;
|
|
76
|
+
sessionId: string;
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
export const AnswersResponse$zodSchema: z.ZodType<
|
|
@@ -82,6 +83,7 @@ export const AnswersResponse$zodSchema: z.ZodType<
|
|
|
82
83
|
> = z.object({
|
|
83
84
|
answer: z.lazy(() => AnswersResponseAnswer$zodSchema),
|
|
84
85
|
channel: z.lazy(() => AnswersResponseChannel$zodSchema).optional(),
|
|
86
|
+
clientSessionId: z.string().optional(),
|
|
85
87
|
eventId: z.string().optional(),
|
|
86
88
|
searchResults: z.array(SearchResult$zodSchema),
|
|
87
89
|
sessionId: z.string(),
|
package/src/models/article.ts
CHANGED
|
@@ -61,12 +61,12 @@ export type Article = {
|
|
|
61
61
|
departmentID?: string | undefined;
|
|
62
62
|
description?: string | undefined;
|
|
63
63
|
expirationDate?: string | undefined;
|
|
64
|
+
imageURL?: string | undefined;
|
|
64
65
|
includeInGenAI?: boolean | undefined;
|
|
65
66
|
isSubscribed?: boolean | undefined;
|
|
66
67
|
modifiedDate?: string | undefined;
|
|
67
68
|
languageCode?: LanguageCode | undefined;
|
|
68
69
|
link?: Link | undefined;
|
|
69
|
-
imageURL?: string | undefined;
|
|
70
70
|
name: string;
|
|
71
71
|
structuredAuthoringFields?: StructuredAuthoringFields | undefined;
|
|
72
72
|
articleState?: string | undefined;
|
|
@@ -7,65 +7,65 @@ import {
|
|
|
7
7
|
AdditionalSnippets,
|
|
8
8
|
AdditionalSnippets$zodSchema,
|
|
9
9
|
} from "./additionalsnippets.js";
|
|
10
|
-
import { Tags, Tags$zodSchema } from "./tags.js";
|
|
11
10
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./
|
|
11
|
+
AITopicBreadcrumb,
|
|
12
|
+
AITopicBreadcrumb$zodSchema,
|
|
13
|
+
} from "./aitopicbreadcrumb.js";
|
|
14
|
+
import { SchemasTags, SchemasTags$zodSchema } from "./schemastags.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Format of the source document (HTML, DOCX, PPTX or PDF).
|
|
18
18
|
*/
|
|
19
|
-
export const
|
|
19
|
+
export const ArticleAISearchResultDocType$zodSchema = z.enum([
|
|
20
20
|
"HTML",
|
|
21
21
|
"DOCX",
|
|
22
22
|
"PDF",
|
|
23
23
|
"PPTX",
|
|
24
24
|
]).describe("Format of the source document (HTML, DOCX, PPTX or PDF).");
|
|
25
25
|
|
|
26
|
-
export type
|
|
27
|
-
typeof
|
|
26
|
+
export type ArticleAISearchResultDocType = z.infer<
|
|
27
|
+
typeof ArticleAISearchResultDocType$zodSchema
|
|
28
28
|
>;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* The source type.
|
|
32
32
|
*/
|
|
33
|
-
export const
|
|
33
|
+
export const ArticleAISearchResultSource$zodSchema = z.enum([
|
|
34
34
|
"eGain Article",
|
|
35
35
|
"eGain Attachment",
|
|
36
36
|
]).describe("The source type.");
|
|
37
37
|
|
|
38
|
-
export type
|
|
39
|
-
typeof
|
|
38
|
+
export type ArticleAISearchResultSource = z.infer<
|
|
39
|
+
typeof ArticleAISearchResultSource$zodSchema
|
|
40
40
|
>;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* The custom attribute's type.
|
|
44
44
|
*/
|
|
45
|
-
export const
|
|
45
|
+
export const ArticleAISearchResultType$zodSchema = z.enum([
|
|
46
46
|
"STRING",
|
|
47
47
|
"INTEGER",
|
|
48
48
|
"BOOLEAN",
|
|
49
49
|
"DATETIME",
|
|
50
50
|
]).describe("The custom attribute's type.");
|
|
51
51
|
|
|
52
|
-
export type
|
|
53
|
-
typeof
|
|
52
|
+
export type ArticleAISearchResultType = z.infer<
|
|
53
|
+
typeof ArticleAISearchResultType$zodSchema
|
|
54
54
|
>;
|
|
55
55
|
|
|
56
|
-
export type
|
|
56
|
+
export type ArticleAISearchResultCustomAttribute = {
|
|
57
57
|
name?: string | undefined;
|
|
58
58
|
value?: Array<string> | undefined;
|
|
59
|
-
type?:
|
|
59
|
+
type?: ArticleAISearchResultType | undefined;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
export const
|
|
63
|
-
|
|
62
|
+
export const ArticleAISearchResultCustomAttribute$zodSchema: z.ZodType<
|
|
63
|
+
ArticleAISearchResultCustomAttribute,
|
|
64
64
|
z.ZodTypeDef,
|
|
65
65
|
unknown
|
|
66
66
|
> = z.object({
|
|
67
67
|
name: z.string().optional(),
|
|
68
|
-
type:
|
|
68
|
+
type: ArticleAISearchResultType$zodSchema.optional(),
|
|
69
69
|
value: z.array(z.string()).optional(),
|
|
70
70
|
});
|
|
71
71
|
|
|
@@ -74,7 +74,7 @@ export const ArticleSearchResultCustomAttribute$zodSchema: z.ZodType<
|
|
|
74
74
|
*/
|
|
75
75
|
export type ArticleTypeAttributes = {
|
|
76
76
|
typeName?: string | undefined;
|
|
77
|
-
articleTypeId?:
|
|
77
|
+
articleTypeId?: any | undefined;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export const ArticleTypeAttributes$zodSchema: z.ZodType<
|
|
@@ -82,35 +82,36 @@ export const ArticleTypeAttributes$zodSchema: z.ZodType<
|
|
|
82
82
|
z.ZodTypeDef,
|
|
83
83
|
unknown
|
|
84
84
|
> = z.object({
|
|
85
|
-
articleTypeId: z.
|
|
85
|
+
articleTypeId: z.any().optional(),
|
|
86
86
|
typeName: z.string().optional(),
|
|
87
87
|
}).describe("The type of the Article and its attributes.");
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Represents a single document or snippet returned by search, along with its metadata and relevance score.
|
|
91
91
|
*/
|
|
92
|
-
export type
|
|
92
|
+
export type ArticleAISearchResult = {
|
|
93
93
|
id: string;
|
|
94
94
|
name: string;
|
|
95
|
-
docType:
|
|
95
|
+
docType: ArticleAISearchResultDocType;
|
|
96
96
|
docName?: string | undefined;
|
|
97
|
-
source:
|
|
98
|
-
customAttributes?: Array<
|
|
99
|
-
snippet
|
|
97
|
+
source: ArticleAISearchResultSource;
|
|
98
|
+
customAttributes?: Array<ArticleAISearchResultCustomAttribute> | undefined;
|
|
99
|
+
snippet: string;
|
|
100
100
|
keywordSnippet?: string | undefined;
|
|
101
101
|
additionalSnippets?: Array<AdditionalSnippets> | undefined;
|
|
102
102
|
additionalSnippetCount?: number | undefined;
|
|
103
103
|
contextualSummary?: string | undefined;
|
|
104
104
|
modifiedDate?: string | undefined;
|
|
105
105
|
headerPath?: string | undefined;
|
|
106
|
-
topicBreadcrumb: Array<
|
|
107
|
-
tagCategories?: Array<
|
|
106
|
+
topicBreadcrumb: Array<AITopicBreadcrumb>;
|
|
107
|
+
tagCategories?: Array<SchemasTags> | undefined;
|
|
108
108
|
articleTypeAttributes?: ArticleTypeAttributes | undefined;
|
|
109
|
-
relevanceScore
|
|
109
|
+
relevanceScore?: number | undefined;
|
|
110
|
+
normalizedScore?: number | undefined;
|
|
110
111
|
};
|
|
111
112
|
|
|
112
|
-
export const
|
|
113
|
-
|
|
113
|
+
export const ArticleAISearchResult$zodSchema: z.ZodType<
|
|
114
|
+
ArticleAISearchResult,
|
|
114
115
|
z.ZodTypeDef,
|
|
115
116
|
unknown
|
|
116
117
|
> = z.object({
|
|
@@ -120,20 +121,21 @@ export const ArticleSearchResult$zodSchema: z.ZodType<
|
|
|
120
121
|
.optional(),
|
|
121
122
|
contextualSummary: z.string().optional(),
|
|
122
123
|
customAttributes: z.array(
|
|
123
|
-
z.lazy(() =>
|
|
124
|
+
z.lazy(() => ArticleAISearchResultCustomAttribute$zodSchema),
|
|
124
125
|
).optional(),
|
|
125
126
|
docName: z.string().optional(),
|
|
126
|
-
docType:
|
|
127
|
+
docType: ArticleAISearchResultDocType$zodSchema,
|
|
127
128
|
headerPath: z.string().optional(),
|
|
128
129
|
id: z.string(),
|
|
129
130
|
keywordSnippet: z.string().optional(),
|
|
130
131
|
modifiedDate: z.string().optional(),
|
|
131
132
|
name: z.string(),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
normalizedScore: z.number().optional(),
|
|
134
|
+
relevanceScore: z.number().optional(),
|
|
135
|
+
snippet: z.string(),
|
|
136
|
+
source: ArticleAISearchResultSource$zodSchema,
|
|
137
|
+
tagCategories: z.array(SchemasTags$zodSchema).optional(),
|
|
138
|
+
topicBreadcrumb: z.array(AITopicBreadcrumb$zodSchema),
|
|
137
139
|
}).describe(
|
|
138
140
|
"Represents a single document or snippet returned by search, along with its metadata and relevance score.",
|
|
139
141
|
);
|
|
@@ -58,10 +58,22 @@ export const Code$zodSchema = z.enum([
|
|
|
58
58
|
"da-DK",
|
|
59
59
|
"sv-SE",
|
|
60
60
|
"ru-RU",
|
|
61
|
-
"fr-CA",
|
|
62
61
|
"zh-CN",
|
|
63
62
|
"ja-JP",
|
|
64
63
|
"ko-KR",
|
|
64
|
+
"de-AT",
|
|
65
|
+
"th-TH",
|
|
66
|
+
"vi-VN",
|
|
67
|
+
"id-ID",
|
|
68
|
+
"ms-MY",
|
|
69
|
+
"fil-PH",
|
|
70
|
+
"fr-CA",
|
|
71
|
+
"hi-IN",
|
|
72
|
+
"uk-UA",
|
|
73
|
+
"bg-BG",
|
|
74
|
+
"sk-SK",
|
|
75
|
+
"sl-SI",
|
|
76
|
+
"sr-RS",
|
|
65
77
|
]).describe("The code of the language.");
|
|
66
78
|
|
|
67
79
|
export type Code = z.infer<typeof Code$zodSchema>;
|
|
@@ -9,33 +9,40 @@ import {
|
|
|
9
9
|
AnswersResponse$zodSchema,
|
|
10
10
|
} from "./answersresponse.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./
|
|
12
|
+
RequiredLanguageCode,
|
|
13
|
+
RequiredLanguageCode$zodSchema,
|
|
14
|
+
} from "./requiredlanguagecode.js";
|
|
15
15
|
|
|
16
|
-
export type
|
|
16
|
+
export type GetBestAnswerRequest = {
|
|
17
17
|
q: string;
|
|
18
18
|
portalID: string;
|
|
19
19
|
dollarFilterUserProfileID?: string | undefined;
|
|
20
|
-
Dollar_lang
|
|
20
|
+
Dollar_lang: RequiredLanguageCode;
|
|
21
21
|
dollarFilterTags?: { [k: string]: Array<string> } | undefined;
|
|
22
22
|
dollarFilterTopicIds?: Array<string> | undefined;
|
|
23
23
|
AnswersRequest?: AnswersRequest | undefined;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export const
|
|
27
|
-
|
|
26
|
+
export const GetBestAnswerRequest$zodSchema: z.ZodType<
|
|
27
|
+
GetBestAnswerRequest,
|
|
28
28
|
z.ZodTypeDef,
|
|
29
29
|
unknown
|
|
30
30
|
> = z.object({
|
|
31
31
|
AnswersRequest: AnswersRequest$zodSchema.optional(),
|
|
32
|
-
Dollar_lang:
|
|
32
|
+
Dollar_lang: RequiredLanguageCode$zodSchema,
|
|
33
33
|
dollarFilterTags: z.record(z.array(z.string())).describe(
|
|
34
34
|
"An object where each key is a **Category Tag ID** (numeric string), \n"
|
|
35
35
|
+ "and each value is an array of **Tag IDs** for that category.\n"
|
|
36
|
+
+ " **Note**:\n"
|
|
37
|
+
+ " - The '$filter[tags]' query parameter JSON value should be url encoded.\n"
|
|
38
|
+
+ " - Some developer tools for invoking APIs may not url encode the '$filter[tags]' query parameter JSON value by default. Ensure that only url encoded values are used.\n"
|
|
39
|
+
+ " - Example of JSON value: {\"BASE-40845\":[\"BASE-40849\",\"BASE-40853\"]}\n"
|
|
40
|
+
+ " - Example of URL encoded value: %7B%22BASE-40845%22%3A%5B%22BASE-40849%22%2C%22BASE-40853%22%5D%7D\n"
|
|
36
41
|
+ "",
|
|
37
42
|
).optional(),
|
|
38
|
-
dollarFilterTopicIds: z.array(z.string()).
|
|
43
|
+
dollarFilterTopicIds: z.array(z.string()).describe(
|
|
44
|
+
"An array of topic IDs. It is used to restrict search results to specific topics.",
|
|
45
|
+
).optional(),
|
|
39
46
|
dollarFilterUserProfileID: z.string().optional(),
|
|
40
47
|
portalID: z.string().describe(
|
|
41
48
|
"The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.",
|
|
@@ -43,15 +50,15 @@ export const PostPortalIDAnswersRequest$zodSchema: z.ZodType<
|
|
|
43
50
|
q: z.string().describe("The search query string."),
|
|
44
51
|
});
|
|
45
52
|
|
|
46
|
-
export type
|
|
53
|
+
export type GetBestAnswerResponse = {
|
|
47
54
|
ContentType: string;
|
|
48
55
|
StatusCode: number;
|
|
49
56
|
RawResponse: Response;
|
|
50
57
|
AnswersResponse?: AnswersResponse | undefined;
|
|
51
58
|
};
|
|
52
59
|
|
|
53
|
-
export const
|
|
54
|
-
|
|
60
|
+
export const GetBestAnswerResponse$zodSchema: z.ZodType<
|
|
61
|
+
GetBestAnswerResponse,
|
|
55
62
|
z.ZodTypeDef,
|
|
56
63
|
unknown
|
|
57
64
|
> = z.object({
|
|
@@ -38,6 +38,17 @@ export const LanguageCodeParameter$zodSchema = z.enum([
|
|
|
38
38
|
"hr-HR",
|
|
39
39
|
"ro-RO",
|
|
40
40
|
"th-TH",
|
|
41
|
+
"de-AT",
|
|
42
|
+
"vi-VN",
|
|
43
|
+
"id-ID",
|
|
44
|
+
"ms-MY",
|
|
45
|
+
"fil-PH",
|
|
46
|
+
"fr-CA",
|
|
47
|
+
"hi-IN",
|
|
48
|
+
"uk-UA",
|
|
49
|
+
"bg-BG",
|
|
50
|
+
"sl-SI",
|
|
51
|
+
"sr-RS",
|
|
41
52
|
"xx-XX",
|
|
42
53
|
]).describe(
|
|
43
54
|
"The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>$lang</code> is not passed, then the portal's default language is used.</li><br><br>**Important**: When using this API via SDK or MCP, use the parameter name `Dollar_lang`, not `$lang` or `lang`.",
|
|
@@ -38,6 +38,17 @@ export const LanguageQueryParameter$zodSchema = z.enum([
|
|
|
38
38
|
"hr-HR",
|
|
39
39
|
"ro-RO",
|
|
40
40
|
"th-TH",
|
|
41
|
+
"de-AT",
|
|
42
|
+
"vi-VN",
|
|
43
|
+
"id-ID",
|
|
44
|
+
"ms-MY",
|
|
45
|
+
"fil-PH",
|
|
46
|
+
"fr-CA",
|
|
47
|
+
"hi-IN",
|
|
48
|
+
"uk-UA",
|
|
49
|
+
"bg-BG",
|
|
50
|
+
"sl-SI",
|
|
51
|
+
"sr-RS",
|
|
41
52
|
"xx-XX",
|
|
42
53
|
]).describe(
|
|
43
54
|
"The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>$lang</code> is not passed, then the portal's default language is used.</li><br><br>**Important**: When using this API via SDK or MCP, use the parameter name `Dollar_lang`, not `$lang` or `lang`.",
|
|
@@ -38,6 +38,18 @@ export const MandatoryLanguageQueryParameter$zodSchema = z.enum([
|
|
|
38
38
|
"hr-HR",
|
|
39
39
|
"ro-RO",
|
|
40
40
|
"th-TH",
|
|
41
|
+
"de-AT",
|
|
42
|
+
"vi-VN",
|
|
43
|
+
"id-ID",
|
|
44
|
+
"ms-MY",
|
|
45
|
+
"fil-PH",
|
|
46
|
+
"fr-CA",
|
|
47
|
+
"hi-IN",
|
|
48
|
+
"uk-UA",
|
|
49
|
+
"bg-BG",
|
|
50
|
+
"sl-SI",
|
|
51
|
+
"sr-RS",
|
|
52
|
+
"xx-XX",
|
|
41
53
|
]).describe(
|
|
42
54
|
"The language used for fetching the details of a resource. Resources available in different languages may differ from each other. **Important**: When using this API via SDK or MCP, use the parameter name `Dollar_lang`, not `$lang` or `lang`.",
|
|
43
55
|
);
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "./
|
|
7
|
+
AITopicBreadcrumb,
|
|
8
|
+
AITopicBreadcrumb$zodSchema,
|
|
9
|
+
} from "./aitopicbreadcrumb.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Format of the source document (HTML, DOCX, PPTX, or PDF).
|
|
@@ -43,7 +43,7 @@ export type ReferenceResponse = {
|
|
|
43
43
|
docName?: string | undefined;
|
|
44
44
|
docType: ReferenceResponseDocType;
|
|
45
45
|
source: ReferenceResponseSource;
|
|
46
|
-
topicBreadcrumb?: Array<
|
|
46
|
+
topicBreadcrumb?: Array<AITopicBreadcrumb> | undefined;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
export const ReferenceResponse$zodSchema: z.ZodType<
|
|
@@ -56,5 +56,5 @@ export const ReferenceResponse$zodSchema: z.ZodType<
|
|
|
56
56
|
id: z.string(),
|
|
57
57
|
name: z.string(),
|
|
58
58
|
source: ReferenceResponseSource$zodSchema,
|
|
59
|
-
topicBreadcrumb: z.array(
|
|
59
|
+
topicBreadcrumb: z.array(AITopicBreadcrumb$zodSchema).optional(),
|
|
60
60
|
}).describe("One document used in generated response");
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The language that describes the details of a resource. Resources available in different languages may differ from each other.
|
|
9
|
+
*/
|
|
10
|
+
export const RequiredLanguageCode$zodSchema = z.enum([
|
|
11
|
+
"en-US",
|
|
12
|
+
"fr-FR",
|
|
13
|
+
"en-GB",
|
|
14
|
+
"es-ES",
|
|
15
|
+
"it-IT",
|
|
16
|
+
"nl-NL",
|
|
17
|
+
"da-DA",
|
|
18
|
+
"sv-SE",
|
|
19
|
+
"pt-PT",
|
|
20
|
+
"fi-FI",
|
|
21
|
+
"no-NB",
|
|
22
|
+
"no-NN",
|
|
23
|
+
"ja-JA",
|
|
24
|
+
"de-DE",
|
|
25
|
+
"pt-BR",
|
|
26
|
+
"zh-CN",
|
|
27
|
+
"zh-TW",
|
|
28
|
+
"ko-KO",
|
|
29
|
+
"ru-RU",
|
|
30
|
+
"el-EL",
|
|
31
|
+
"tr-TR",
|
|
32
|
+
"pl-PL",
|
|
33
|
+
"cs-CS",
|
|
34
|
+
"sk-SK",
|
|
35
|
+
"hu-HU",
|
|
36
|
+
"sr-SR",
|
|
37
|
+
"ar-SA",
|
|
38
|
+
"hr-HR",
|
|
39
|
+
"ro-RO",
|
|
40
|
+
"th-TH",
|
|
41
|
+
"xx-XX",
|
|
42
|
+
]).describe(
|
|
43
|
+
"The language that describes the details of a resource. Resources available in different languages may differ from each other.",
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export type RequiredLanguageCode = z.infer<
|
|
47
|
+
typeof RequiredLanguageCode$zodSchema
|
|
48
|
+
>;
|