@fluid-topics/public-api 1.0.109 → 1.0.110-alpha
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/.npmignore +14 -0
- package/dist/cjs/types/ft-common/public.js +51 -2
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/types/ft-common/public.d.ts +48 -3
- package/dist/mjs/types/ft-common/public.js +46 -0
- package/package.json +1 -1
- package/yarn.lock +4323 -0
|
@@ -253,6 +253,7 @@ export var FtAnalyticsEventName;
|
|
|
253
253
|
FtAnalyticsEventName["SAVED_SEARCH__UPDATE"] = "SAVED_SEARCH__UPDATE";
|
|
254
254
|
FtAnalyticsEventName["SEARCH_PAGE__SELECT"] = "SEARCH_PAGE__SELECT";
|
|
255
255
|
FtAnalyticsEventName["SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU"] = "SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU";
|
|
256
|
+
FtAnalyticsEventName["TOPIC__AI_TRANSLATE"] = "TOPIC__AI_TRANSLATE";
|
|
256
257
|
FtAnalyticsEventName["TOPIC__DISPLAY"] = "TOPIC__DISPLAY";
|
|
257
258
|
FtAnalyticsEventName["TOPIC__RATE"] = "TOPIC__RATE";
|
|
258
259
|
FtAnalyticsEventName["TOPIC__START_DISPLAY"] = "TOPIC__START_DISPLAY";
|
|
@@ -550,6 +551,7 @@ export var FtExternalWebComponentContext;
|
|
|
550
551
|
FtExternalWebComponentContext["SEARCH"] = "SEARCH";
|
|
551
552
|
FtExternalWebComponentContext["SEARCH_RESULT"] = "SEARCH_RESULT";
|
|
552
553
|
FtExternalWebComponentContext["SEARCH_ANNOUNCEMENT"] = "SEARCH_ANNOUNCEMENT";
|
|
554
|
+
FtExternalWebComponentContext["LINK_PREVIEW"] = "LINK_PREVIEW";
|
|
553
555
|
})(FtExternalWebComponentContext || (FtExternalWebComponentContext = {}));
|
|
554
556
|
export const isFtExternalWebComponentContext = (o) => Object.keys(FtExternalWebComponentContext).includes(o);
|
|
555
557
|
export const isFtFeedbackCreation = (o) => {
|
|
@@ -677,6 +679,7 @@ export const isFtMySearchCreation = (o) => {
|
|
|
677
679
|
export const isFtMySearchRequest = (o) => {
|
|
678
680
|
return isObject(o)
|
|
679
681
|
&& (o.periodFilter == null || isFtPeriodFilter(o.periodFilter))
|
|
682
|
+
&& (o.keywordMatch == null || isFtSearchKeywordMatch(o.keywordMatch))
|
|
680
683
|
&& (o.sortId == null || isString(o.sortId))
|
|
681
684
|
&& (isString(o.query))
|
|
682
685
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
@@ -777,6 +780,13 @@ export var FtPeriodFilterType;
|
|
|
777
780
|
FtPeriodFilterType["CUSTOM"] = "CUSTOM";
|
|
778
781
|
})(FtPeriodFilterType || (FtPeriodFilterType = {}));
|
|
779
782
|
export const isFtPeriodFilterType = (o) => Object.keys(FtPeriodFilterType).includes(o);
|
|
783
|
+
// From: SearchKeywordMatch
|
|
784
|
+
export var FtSearchKeywordMatch;
|
|
785
|
+
(function (FtSearchKeywordMatch) {
|
|
786
|
+
FtSearchKeywordMatch["OPTIONAL"] = "OPTIONAL";
|
|
787
|
+
FtSearchKeywordMatch["MANDATORY"] = "MANDATORY";
|
|
788
|
+
})(FtSearchKeywordMatch || (FtSearchKeywordMatch = {}));
|
|
789
|
+
export const isFtSearchKeywordMatch = (o) => Object.keys(FtSearchKeywordMatch).includes(o);
|
|
780
790
|
export const isFtSearchPreset = (o) => {
|
|
781
791
|
return isObject(o)
|
|
782
792
|
&& (isString(o.name))
|
|
@@ -847,6 +857,7 @@ export var FtCollectionDocumentType;
|
|
|
847
857
|
FtCollectionDocumentType["TOPIC"] = "TOPIC";
|
|
848
858
|
FtCollectionDocumentType["PERSONAL_BOOK"] = "PERSONAL_BOOK";
|
|
849
859
|
FtCollectionDocumentType["SHARED_BOOK"] = "SHARED_BOOK";
|
|
860
|
+
FtCollectionDocumentType["HTML_PACKAGE"] = "HTML_PACKAGE";
|
|
850
861
|
})(FtCollectionDocumentType || (FtCollectionDocumentType = {}));
|
|
851
862
|
export const isFtCollectionDocumentType = (o) => Object.keys(FtCollectionDocumentType).includes(o);
|
|
852
863
|
export const isFtDateFilter = (o) => {
|
|
@@ -928,6 +939,7 @@ export const isFtSearchPrior = (o) => {
|
|
|
928
939
|
export const isFtSearchRequest = (o) => {
|
|
929
940
|
return isObject(o)
|
|
930
941
|
&& (o.periodFilter == null || isFtPeriodFilter(o.periodFilter))
|
|
942
|
+
&& (o.keywordMatch == null || isFtSearchKeywordMatch(o.keywordMatch))
|
|
931
943
|
&& (isString(o.query))
|
|
932
944
|
&& (isFtPageRequest(o.paging))
|
|
933
945
|
&& (o.filters == null || (Array.isArray(o.filters)
|
|
@@ -962,10 +974,12 @@ export const isFtSearchResultCluster = (o) => {
|
|
|
962
974
|
};
|
|
963
975
|
export const isFtSearchResultClusterEntry = (o) => {
|
|
964
976
|
return isObject(o)
|
|
977
|
+
&& (o.htmlPackage == null || isFtSearchResultHtmlPackage(o.htmlPackage))
|
|
965
978
|
&& ((Array.isArray(o.missingTerms)
|
|
966
979
|
&& o.missingTerms.every((v) => isString(v))))
|
|
967
980
|
&& (o.document == null || isFtSearchResultUnstructuredDocument(o.document))
|
|
968
981
|
&& (o.topic == null || isFtSearchResultTopic(o.topic))
|
|
982
|
+
&& (o.htmlPackagePage == null || isFtSearchResultHtmlPackagePage(o.htmlPackagePage))
|
|
969
983
|
&& (isFtSearchResultType(o.type))
|
|
970
984
|
&& (o.map == null || isFtSearchResultMap(o.map));
|
|
971
985
|
};
|
|
@@ -987,6 +1001,35 @@ export const isFtSearchResultUnstructuredDocument = (o) => {
|
|
|
987
1001
|
&& (isString(o.lastEditionDate))
|
|
988
1002
|
&& (isString(o.htmlExcerpt));
|
|
989
1003
|
};
|
|
1004
|
+
export const isFtSearchResultHtmlPackage = (o) => {
|
|
1005
|
+
return isObject(o)
|
|
1006
|
+
&& ((Array.isArray(o.metadata)
|
|
1007
|
+
&& o.metadata.every((v) => isFtMetadata(v))))
|
|
1008
|
+
&& (isString(o.htmlTitle))
|
|
1009
|
+
&& (isFtOpenMode(o.openMode))
|
|
1010
|
+
&& (o.originUrl == null || isString(o.originUrl))
|
|
1011
|
+
&& (isString(o.packageId))
|
|
1012
|
+
&& (isString(o.viewerUrl))
|
|
1013
|
+
&& (isString(o.title))
|
|
1014
|
+
&& (isString(o.lastEditionDate))
|
|
1015
|
+
&& (isString(o.lastPublicationDate))
|
|
1016
|
+
&& (isString(o.htmlExcerpt));
|
|
1017
|
+
};
|
|
1018
|
+
export const isFtSearchResultHtmlPackagePage = (o) => {
|
|
1019
|
+
return isObject(o)
|
|
1020
|
+
&& ((Array.isArray(o.metadata)
|
|
1021
|
+
&& o.metadata.every((v) => isFtMetadata(v))))
|
|
1022
|
+
&& (isString(o.htmlTitle))
|
|
1023
|
+
&& (isFtOpenMode(o.openMode))
|
|
1024
|
+
&& (o.originUrl == null || isString(o.originUrl))
|
|
1025
|
+
&& (isString(o.packageId))
|
|
1026
|
+
&& (isString(o.contentId))
|
|
1027
|
+
&& (isString(o.viewerUrl))
|
|
1028
|
+
&& (isString(o.title))
|
|
1029
|
+
&& (isString(o.lastEditionDate))
|
|
1030
|
+
&& (isString(o.packageTitle))
|
|
1031
|
+
&& (isString(o.htmlExcerpt));
|
|
1032
|
+
};
|
|
990
1033
|
export const isFtSearchResultMap = (o) => {
|
|
991
1034
|
return isObject(o)
|
|
992
1035
|
&& ((Array.isArray(o.metadata)
|
|
@@ -1031,6 +1074,8 @@ export var FtSearchResultType;
|
|
|
1031
1074
|
FtSearchResultType["MAP"] = "MAP";
|
|
1032
1075
|
FtSearchResultType["DOCUMENT"] = "DOCUMENT";
|
|
1033
1076
|
FtSearchResultType["TOPIC"] = "TOPIC";
|
|
1077
|
+
FtSearchResultType["HTML_PACKAGE"] = "HTML_PACKAGE";
|
|
1078
|
+
FtSearchResultType["HTML_PACKAGE_PAGE"] = "HTML_PACKAGE_PAGE";
|
|
1034
1079
|
})(FtSearchResultType || (FtSearchResultType = {}));
|
|
1035
1080
|
export const isFtSearchResultType = (o) => Object.keys(FtSearchResultType).includes(o);
|
|
1036
1081
|
// From: WsPublicSearchScope
|
|
@@ -1103,6 +1148,7 @@ export const isFtLocalizableLabelType = (o) => Object.keys(FtLocalizableLabelTyp
|
|
|
1103
1148
|
export const isFtSuggestRequest = (o) => {
|
|
1104
1149
|
return isObject(o)
|
|
1105
1150
|
&& (isString(o.input))
|
|
1151
|
+
&& (o.keywordMatch == null || isFtSearchKeywordMatch(o.keywordMatch))
|
|
1106
1152
|
&& (o.sortId == null || isString(o.sortId))
|
|
1107
1153
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
1108
1154
|
&& ((Array.isArray(o.sort)
|