@fluid-topics/public-api 1.0.108 → 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/cjs/types/ft-server/public.js +1 -0
- 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/dist/mjs/types/ft-server/public.d.ts +1 -0
- package/dist/mjs/types/ft-server/public.js +1 -0
- package/package.json +1 -1
- package/yarn.lock +4323 -0
|
@@ -234,6 +234,7 @@ export declare enum FtAnalyticsEventName {
|
|
|
234
234
|
SAVED_SEARCH__UPDATE = "SAVED_SEARCH__UPDATE",
|
|
235
235
|
SEARCH_PAGE__SELECT = "SEARCH_PAGE__SELECT",
|
|
236
236
|
SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU = "SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",
|
|
237
|
+
TOPIC__AI_TRANSLATE = "TOPIC__AI_TRANSLATE",
|
|
237
238
|
TOPIC__DISPLAY = "TOPIC__DISPLAY",
|
|
238
239
|
TOPIC__RATE = "TOPIC__RATE",
|
|
239
240
|
TOPIC__START_DISPLAY = "TOPIC__START_DISPLAY",
|
|
@@ -510,7 +511,8 @@ export declare enum FtExternalWebComponentContext {
|
|
|
510
511
|
TOPIC_TEMPLATE = "TOPIC_TEMPLATE",
|
|
511
512
|
SEARCH = "SEARCH",
|
|
512
513
|
SEARCH_RESULT = "SEARCH_RESULT",
|
|
513
|
-
SEARCH_ANNOUNCEMENT = "SEARCH_ANNOUNCEMENT"
|
|
514
|
+
SEARCH_ANNOUNCEMENT = "SEARCH_ANNOUNCEMENT",
|
|
515
|
+
LINK_PREVIEW = "LINK_PREVIEW"
|
|
514
516
|
}
|
|
515
517
|
export type FtExternalWebComponentContextKeys = keyof typeof FtExternalWebComponentContext;
|
|
516
518
|
export declare const isFtExternalWebComponentContext: (o: any) => o is FtExternalWebComponentContext;
|
|
@@ -624,6 +626,7 @@ export interface FtMySearchCreation {
|
|
|
624
626
|
export declare const isFtMySearchCreation: (o: any) => o is FtMySearchCreation;
|
|
625
627
|
export interface FtMySearchRequest {
|
|
626
628
|
/** @deprecated */ periodFilter?: FtPeriodFilter;
|
|
629
|
+
keywordMatch?: FtSearchKeywordMatchKeys;
|
|
627
630
|
sortId?: string;
|
|
628
631
|
query: string;
|
|
629
632
|
scope?: FtSearchScopeKeys;
|
|
@@ -714,6 +717,12 @@ export declare enum FtPeriodFilterType {
|
|
|
714
717
|
}
|
|
715
718
|
export type FtPeriodFilterTypeKeys = keyof typeof FtPeriodFilterType;
|
|
716
719
|
export declare const isFtPeriodFilterType: (o: any) => o is FtPeriodFilterType;
|
|
720
|
+
export declare enum FtSearchKeywordMatch {
|
|
721
|
+
OPTIONAL = "OPTIONAL",
|
|
722
|
+
MANDATORY = "MANDATORY"
|
|
723
|
+
}
|
|
724
|
+
export type FtSearchKeywordMatchKeys = keyof typeof FtSearchKeywordMatch;
|
|
725
|
+
export declare const isFtSearchKeywordMatch: (o: any) => o is FtSearchKeywordMatch;
|
|
717
726
|
export interface FtSearchPreset {
|
|
718
727
|
name: string;
|
|
719
728
|
priority: number;
|
|
@@ -775,7 +784,8 @@ export declare enum FtCollectionDocumentType {
|
|
|
775
784
|
DOCUMENT = "DOCUMENT",
|
|
776
785
|
TOPIC = "TOPIC",
|
|
777
786
|
PERSONAL_BOOK = "PERSONAL_BOOK",
|
|
778
|
-
SHARED_BOOK = "SHARED_BOOK"
|
|
787
|
+
SHARED_BOOK = "SHARED_BOOK",
|
|
788
|
+
HTML_PACKAGE = "HTML_PACKAGE"
|
|
779
789
|
}
|
|
780
790
|
export type FtCollectionDocumentTypeKeys = keyof typeof FtCollectionDocumentType;
|
|
781
791
|
export declare const isFtCollectionDocumentType: (o: any) => o is FtCollectionDocumentType;
|
|
@@ -851,6 +861,7 @@ export interface FtSearchPrior {
|
|
|
851
861
|
export declare const isFtSearchPrior: (o: any) => o is FtSearchPrior;
|
|
852
862
|
export interface FtSearchRequest {
|
|
853
863
|
/** @deprecated */ periodFilter?: FtPeriodFilter;
|
|
864
|
+
keywordMatch?: FtSearchKeywordMatchKeys;
|
|
854
865
|
query: string;
|
|
855
866
|
paging: FtPageRequest;
|
|
856
867
|
/** @deprecated */ filters?: Array<FtLegacyMetadataFilter>;
|
|
@@ -879,9 +890,11 @@ export interface FtSearchResultCluster {
|
|
|
879
890
|
}
|
|
880
891
|
export declare const isFtSearchResultCluster: (o: any) => o is FtSearchResultCluster;
|
|
881
892
|
export interface FtSearchResultClusterEntry {
|
|
893
|
+
htmlPackage?: FtSearchResultHtmlPackage;
|
|
882
894
|
missingTerms: Array<string>;
|
|
883
895
|
document?: FtSearchResultUnstructuredDocument;
|
|
884
896
|
topic?: FtSearchResultTopic;
|
|
897
|
+
htmlPackagePage?: FtSearchResultHtmlPackagePage;
|
|
885
898
|
type: FtSearchResultTypeKeys;
|
|
886
899
|
map?: FtSearchResultMap;
|
|
887
900
|
}
|
|
@@ -904,6 +917,35 @@ export interface FtSearchResultUnstructuredDocument {
|
|
|
904
917
|
htmlExcerpt: string;
|
|
905
918
|
}
|
|
906
919
|
export declare const isFtSearchResultUnstructuredDocument: (o: any) => o is FtSearchResultUnstructuredDocument;
|
|
920
|
+
export interface FtSearchResultHtmlPackage {
|
|
921
|
+
metadata: Array<FtMetadata>;
|
|
922
|
+
htmlTitle: string;
|
|
923
|
+
openMode: FtOpenModeKeys;
|
|
924
|
+
originUrl?: string;
|
|
925
|
+
packageId: string;
|
|
926
|
+
source: any;
|
|
927
|
+
viewerUrl: string;
|
|
928
|
+
title: string;
|
|
929
|
+
lastEditionDate: string;
|
|
930
|
+
lastPublicationDate: string;
|
|
931
|
+
htmlExcerpt: string;
|
|
932
|
+
}
|
|
933
|
+
export declare const isFtSearchResultHtmlPackage: (o: any) => o is FtSearchResultHtmlPackage;
|
|
934
|
+
export interface FtSearchResultHtmlPackagePage {
|
|
935
|
+
metadata: Array<FtMetadata>;
|
|
936
|
+
htmlTitle: string;
|
|
937
|
+
openMode: FtOpenModeKeys;
|
|
938
|
+
originUrl?: string;
|
|
939
|
+
packageId: string;
|
|
940
|
+
contentId: string;
|
|
941
|
+
source: any;
|
|
942
|
+
viewerUrl: string;
|
|
943
|
+
title: string;
|
|
944
|
+
lastEditionDate: string;
|
|
945
|
+
packageTitle: string;
|
|
946
|
+
htmlExcerpt: string;
|
|
947
|
+
}
|
|
948
|
+
export declare const isFtSearchResultHtmlPackagePage: (o: any) => o is FtSearchResultHtmlPackagePage;
|
|
907
949
|
export interface FtSearchResultMap {
|
|
908
950
|
metadata: Array<FtMetadata>;
|
|
909
951
|
openMode?: FtOpenModeKeys;
|
|
@@ -943,7 +985,9 @@ export declare const isFtSearchResultTopic: (o: any) => o is FtSearchResultTopic
|
|
|
943
985
|
export declare enum FtSearchResultType {
|
|
944
986
|
MAP = "MAP",
|
|
945
987
|
DOCUMENT = "DOCUMENT",
|
|
946
|
-
TOPIC = "TOPIC"
|
|
988
|
+
TOPIC = "TOPIC",
|
|
989
|
+
HTML_PACKAGE = "HTML_PACKAGE",
|
|
990
|
+
HTML_PACKAGE_PAGE = "HTML_PACKAGE_PAGE"
|
|
947
991
|
}
|
|
948
992
|
export type FtSearchResultTypeKeys = keyof typeof FtSearchResultType;
|
|
949
993
|
export declare const isFtSearchResultType: (o: any) => o is FtSearchResultType;
|
|
@@ -1011,6 +1055,7 @@ export type FtLocalizableLabelTypeKeys = keyof typeof FtLocalizableLabelType;
|
|
|
1011
1055
|
export declare const isFtLocalizableLabelType: (o: any) => o is FtLocalizableLabelType;
|
|
1012
1056
|
export interface FtSuggestRequest {
|
|
1013
1057
|
input: string;
|
|
1058
|
+
keywordMatch?: FtSearchKeywordMatchKeys;
|
|
1014
1059
|
sortId?: string;
|
|
1015
1060
|
scope?: FtSearchScopeKeys;
|
|
1016
1061
|
sort: Array<FtSearchSortCriterion>;
|
|
@@ -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)
|
|
@@ -85,6 +85,7 @@ export interface FtGenAIGenerationTraceOutput {
|
|
|
85
85
|
export declare const isFtGenAIGenerationTraceOutput: (o: any) => o is FtGenAIGenerationTraceOutput;
|
|
86
86
|
export interface FtGenAIRagFetchTracesRequest {
|
|
87
87
|
endDate?: string;
|
|
88
|
+
conversationId?: string;
|
|
88
89
|
nbResults?: number;
|
|
89
90
|
userId?: string;
|
|
90
91
|
startDate?: string;
|
|
@@ -100,6 +100,7 @@ export const isFtGenAIGenerationTraceOutput = (o) => {
|
|
|
100
100
|
export const isFtGenAIRagFetchTracesRequest = (o) => {
|
|
101
101
|
return isObject(o)
|
|
102
102
|
&& (o.endDate == null || isString(o.endDate))
|
|
103
|
+
&& (o.conversationId == null || isString(o.conversationId))
|
|
103
104
|
&& (o.nbResults == null || isNumber(o.nbResults))
|
|
104
105
|
&& (o.userId == null || isString(o.userId))
|
|
105
106
|
&& (o.startDate == null || isString(o.startDate));
|