@fluid-topics/public-api 1.0.114 → 1.0.117
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/dist/cjs/index.js +25 -2
- package/dist/cjs/models.js +18 -0
- package/dist/cjs/roles/roles.js +1 -1
- package/dist/cjs/types/ft-common/public.js +71 -81
- package/dist/cjs/types/ft-server/public.js +125 -11
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/index.d.ts +18 -6
- package/dist/mjs/index.js +25 -2
- package/dist/mjs/models.d.ts +2 -0
- package/dist/mjs/models.js +2 -0
- package/dist/mjs/roles/roles.js +1 -1
- package/dist/mjs/types/ft-common/public.d.ts +53 -36
- package/dist/mjs/types/ft-common/public.js +33 -45
- package/dist/mjs/types/ft-server/public.d.ts +118 -11
- package/dist/mjs/types/ft-server/public.js +109 -6
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ const isObject = (o) => typeof o === "object" && o != null;
|
|
|
2
2
|
const isBoolean = (o) => typeof o === "boolean";
|
|
3
3
|
const isNumber = (o) => typeof o === "number";
|
|
4
4
|
const isString = (o) => typeof o === "string";
|
|
5
|
-
// From: ConfigurationHistoryEntryStatus
|
|
6
5
|
export var FtConfigurationHistoryEntryStatus;
|
|
7
6
|
(function (FtConfigurationHistoryEntryStatus) {
|
|
8
7
|
FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
|
|
@@ -28,6 +27,44 @@ export const isFtReaderFeedbackConfiguration = (o) => {
|
|
|
28
27
|
&& ((Array.isArray(o.subjectMetadataIds)
|
|
29
28
|
&& o.subjectMetadataIds.every((v) => isString(v))));
|
|
30
29
|
};
|
|
30
|
+
export var FtChatbotAdminRatingTag;
|
|
31
|
+
(function (FtChatbotAdminRatingTag) {
|
|
32
|
+
FtChatbotAdminRatingTag["INACCURATE"] = "INACCURATE";
|
|
33
|
+
FtChatbotAdminRatingTag["INCOMPLETE"] = "INCOMPLETE";
|
|
34
|
+
FtChatbotAdminRatingTag["OFF_TOPIC"] = "OFF_TOPIC";
|
|
35
|
+
FtChatbotAdminRatingTag["IRRELEVANT_SOURCES"] = "IRRELEVANT_SOURCES";
|
|
36
|
+
FtChatbotAdminRatingTag["SUMMARY"] = "SUMMARY";
|
|
37
|
+
FtChatbotAdminRatingTag["SEMANTIC_SEARCH"] = "SEMANTIC_SEARCH";
|
|
38
|
+
FtChatbotAdminRatingTag["CHATBOT_INSTRUCTIONS"] = "CHATBOT_INSTRUCTIONS";
|
|
39
|
+
FtChatbotAdminRatingTag["OTHER"] = "OTHER";
|
|
40
|
+
})(FtChatbotAdminRatingTag || (FtChatbotAdminRatingTag = {}));
|
|
41
|
+
export const isFtChatbotAdminRatingTag = (o) => Object.keys(FtChatbotAdminRatingTag).includes(o);
|
|
42
|
+
export var FtChatbotUserRatingTag;
|
|
43
|
+
(function (FtChatbotUserRatingTag) {
|
|
44
|
+
FtChatbotUserRatingTag["INACCURATE"] = "INACCURATE";
|
|
45
|
+
FtChatbotUserRatingTag["INCOMPLETE"] = "INCOMPLETE";
|
|
46
|
+
FtChatbotUserRatingTag["OFF_TOPIC"] = "OFF_TOPIC";
|
|
47
|
+
FtChatbotUserRatingTag["IRRELEVANT_SOURCES"] = "IRRELEVANT_SOURCES";
|
|
48
|
+
FtChatbotUserRatingTag["SLOW"] = "SLOW";
|
|
49
|
+
FtChatbotUserRatingTag["OTHER"] = "OTHER";
|
|
50
|
+
})(FtChatbotUserRatingTag || (FtChatbotUserRatingTag = {}));
|
|
51
|
+
export const isFtChatbotUserRatingTag = (o) => Object.keys(FtChatbotUserRatingTag).includes(o);
|
|
52
|
+
export const isFtGenAIChatbotAdminRating = (o) => {
|
|
53
|
+
return isObject(o)
|
|
54
|
+
&& (isString(o.profileId))
|
|
55
|
+
&& (o.comment == null || isString(o.comment))
|
|
56
|
+
&& (isNumber(o.value))
|
|
57
|
+
&& (o.tags == null || (Array.isArray(o.tags)
|
|
58
|
+
&& o.tags.every((v) => isFtChatbotAdminRatingTag(v))));
|
|
59
|
+
};
|
|
60
|
+
export const isFtGenAIChatbotUserRating = (o) => {
|
|
61
|
+
return isObject(o)
|
|
62
|
+
&& (isString(o.profileId))
|
|
63
|
+
&& (o.comment == null || isString(o.comment))
|
|
64
|
+
&& (isNumber(o.value))
|
|
65
|
+
&& (o.tags == null || (Array.isArray(o.tags)
|
|
66
|
+
&& o.tags.every((v) => isFtChatbotUserRatingTag(v))));
|
|
67
|
+
};
|
|
31
68
|
export const isFtGenAIRating = (o) => {
|
|
32
69
|
return isObject(o)
|
|
33
70
|
&& (isNumber(o.rating))
|
|
@@ -41,7 +78,23 @@ export const isFtGenAIGenerateInput = (o) => {
|
|
|
41
78
|
&& Object.keys(o.parameters).every((k) => isString(k))
|
|
42
79
|
&& Object.values(o.parameters).every((v) => isString(v))));
|
|
43
80
|
};
|
|
44
|
-
|
|
81
|
+
export const isFtAgenticSearchRequest = (o) => {
|
|
82
|
+
return isObject(o)
|
|
83
|
+
&& (o.cluster == null || isFtClusteredSemanticSearchCluster(o.cluster))
|
|
84
|
+
&& (o.promoteRules == null || (Array.isArray(o.promoteRules)))
|
|
85
|
+
&& (isString(o.query))
|
|
86
|
+
&& (o.toc == null || isFtAgenticSearchRequestTocOptions(o.toc))
|
|
87
|
+
&& (isNumber(o.nbResultsAfterRerank))
|
|
88
|
+
&& (isString(o.rerankModel))
|
|
89
|
+
&& (o.filters == null || (Array.isArray(o.filters)
|
|
90
|
+
&& o.filters.every((v) => isFtSemanticSearchFilter(v))))
|
|
91
|
+
&& (isNumber(o.nbResults));
|
|
92
|
+
};
|
|
93
|
+
export const isFtAgenticSearchRequestTocOptions = (o) => {
|
|
94
|
+
return isObject(o)
|
|
95
|
+
&& (isBoolean(o.addWordCounts))
|
|
96
|
+
&& (isBoolean(o.collapse));
|
|
97
|
+
};
|
|
45
98
|
export var FtRagResponseFormat;
|
|
46
99
|
(function (FtRagResponseFormat) {
|
|
47
100
|
FtRagResponseFormat["JSON"] = "JSON";
|
|
@@ -56,7 +109,7 @@ export const isFtRagHistory = (o) => {
|
|
|
56
109
|
export const isFtRagInput = (o) => {
|
|
57
110
|
return isObject(o)
|
|
58
111
|
&& (isString(o.profileId))
|
|
59
|
-
&& (
|
|
112
|
+
&& (isString(o.conversationId))
|
|
60
113
|
&& (isString(o.query))
|
|
61
114
|
&& (o.messages == null || (Array.isArray(o.messages)
|
|
62
115
|
&& o.messages.every((v) => isFtRagHistory(v))))
|
|
@@ -219,8 +272,18 @@ export const isFtMapAttachment = (o) => {
|
|
|
219
272
|
&& (isBoolean(o.externalLink))
|
|
220
273
|
&& (isString(o.name))
|
|
221
274
|
&& (isString(o.id))
|
|
222
|
-
&& (
|
|
223
|
-
&& (
|
|
275
|
+
&& (isString(o.mimeType))
|
|
276
|
+
&& (isString(o.viewerUrl));
|
|
277
|
+
};
|
|
278
|
+
export const isFtDocumentAttachment = (o) => {
|
|
279
|
+
return isObject(o)
|
|
280
|
+
&& (isString(o.file))
|
|
281
|
+
&& (o.size == null || isNumber(o.size))
|
|
282
|
+
&& (isBoolean(o.externalLink))
|
|
283
|
+
&& (isString(o.name))
|
|
284
|
+
&& (isString(o.id))
|
|
285
|
+
&& (isString(o.mimeType))
|
|
286
|
+
&& (isString(o.viewerUrl));
|
|
224
287
|
};
|
|
225
288
|
export const isFtPageConfiguration = (o) => {
|
|
226
289
|
return isObject(o)
|
|
@@ -257,7 +320,6 @@ export const isFtPaginationConfiguration = (o) => {
|
|
|
257
320
|
return isObject(o)
|
|
258
321
|
&& (isBoolean(o.splitCurrentPageToc));
|
|
259
322
|
};
|
|
260
|
-
// From: WsTopicContentFormat
|
|
261
323
|
export var FtTopicContentFormat;
|
|
262
324
|
(function (FtTopicContentFormat) {
|
|
263
325
|
FtTopicContentFormat["HTML"] = "HTML";
|
|
@@ -329,3 +391,44 @@ export const isFtSemanticSearchRequest = (o) => {
|
|
|
329
391
|
&& o.filters.every((v) => isFtSemanticSearchFilter(v))))
|
|
330
392
|
&& (o.nbResults == null || isNumber(o.nbResults));
|
|
331
393
|
};
|
|
394
|
+
export const isFtAssetDescriptor = (o) => {
|
|
395
|
+
return isObject(o)
|
|
396
|
+
&& (isString(o.contentUrl))
|
|
397
|
+
&& (isString(o.filename))
|
|
398
|
+
&& (isNumber(o.size))
|
|
399
|
+
&& (isString(o.displayName))
|
|
400
|
+
&& (isString(o.portalUrl))
|
|
401
|
+
&& (isString(o.fingerprint))
|
|
402
|
+
&& (isBoolean(o.viewableInCurrentBrowser))
|
|
403
|
+
&& (isFtAssetHolder(o.holder))
|
|
404
|
+
&& (isString(o.id))
|
|
405
|
+
&& (isString(o.mimeType));
|
|
406
|
+
};
|
|
407
|
+
export const isFtMapResource = (o) => {
|
|
408
|
+
return isObject(o)
|
|
409
|
+
&& (isString(o.contentUrl))
|
|
410
|
+
&& (isString(o.filename))
|
|
411
|
+
&& (isNumber(o.size))
|
|
412
|
+
&& (isString(o.displayName))
|
|
413
|
+
&& (isString(o.portalUrl))
|
|
414
|
+
&& (isString(o.fingerprint))
|
|
415
|
+
&& (isBoolean(o.viewableInCurrentBrowser))
|
|
416
|
+
&& (isFtAssetHolder(o.holder))
|
|
417
|
+
&& (isString(o.id))
|
|
418
|
+
&& (isString(o.mimeType));
|
|
419
|
+
};
|
|
420
|
+
export const isFtAssetHolder = (o) => {
|
|
421
|
+
return isObject(o)
|
|
422
|
+
&& ((Array.isArray(o.metadata)))
|
|
423
|
+
&& (isString(o.portalUrl))
|
|
424
|
+
&& (isString(o.id))
|
|
425
|
+
&& (isFtAssetHolderType(o.type))
|
|
426
|
+
&& (isString(o.lang))
|
|
427
|
+
&& (isString(o.title));
|
|
428
|
+
};
|
|
429
|
+
export var FtAssetHolderType;
|
|
430
|
+
(function (FtAssetHolderType) {
|
|
431
|
+
FtAssetHolderType["MAP"] = "MAP";
|
|
432
|
+
FtAssetHolderType["UNSTRUCTURED_DOCUMENT"] = "UNSTRUCTURED_DOCUMENT";
|
|
433
|
+
})(FtAssetHolderType || (FtAssetHolderType = {}));
|
|
434
|
+
export const isFtAssetHolderType = (o) => Object.keys(FtAssetHolderType).includes(o);
|