@fluid-topics/public-api 1.0.100 → 1.0.102
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 +4 -0
- package/dist/cjs/types/ft-common/public.js +49 -4
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/index.d.ts +3 -1
- package/dist/mjs/index.js +4 -0
- package/dist/mjs/types/ft-common/public.d.ts +39 -3
- package/dist/mjs/types/ft-common/public.js +42 -2
- package/package.json +1 -1
- package/.npmignore +0 -14
- package/.yarnrc +0 -1
- package/yarn.lock +0 -4323
|
@@ -505,7 +505,8 @@ export declare enum FtExternalWebComponentContext {
|
|
|
505
505
|
READER = "READER",
|
|
506
506
|
TOPIC_TEMPLATE = "TOPIC_TEMPLATE",
|
|
507
507
|
SEARCH = "SEARCH",
|
|
508
|
-
SEARCH_RESULT = "SEARCH_RESULT"
|
|
508
|
+
SEARCH_RESULT = "SEARCH_RESULT",
|
|
509
|
+
SEARCH_ANNOUNCEMENT = "SEARCH_ANNOUNCEMENT"
|
|
509
510
|
}
|
|
510
511
|
export type FtExternalWebComponentContextKeys = keyof typeof FtExternalWebComponentContext;
|
|
511
512
|
export declare const isFtExternalWebComponentContext: (o: any) => o is FtExternalWebComponentContext;
|
|
@@ -614,10 +615,11 @@ export interface FtMySearchCreation {
|
|
|
614
615
|
export declare const isFtMySearchCreation: (o: any) => o is FtMySearchCreation;
|
|
615
616
|
export interface FtMySearchRequest {
|
|
616
617
|
/** @deprecated */ periodFilter?: FtPeriodFilter;
|
|
618
|
+
sortId?: string;
|
|
617
619
|
query: string;
|
|
618
620
|
scope?: FtSearchScopeKeys;
|
|
619
621
|
/** @deprecated */ filters?: Array<FtLegacyLabeledMetadataFilter>;
|
|
620
|
-
sort
|
|
622
|
+
sort?: Array<FtSearchSortCriterion>;
|
|
621
623
|
virtualField?: FtVirtualFieldKeys;
|
|
622
624
|
metadataFilters?: Array<FtLabeledMetadataFilter>;
|
|
623
625
|
contentLocale?: string;
|
|
@@ -783,6 +785,7 @@ export interface FtSearchResults {
|
|
|
783
785
|
spellcheck?: FtSpellcheck;
|
|
784
786
|
paging: FtSearchResultsPageInfo;
|
|
785
787
|
results: Array<FtSearchResultCluster>;
|
|
788
|
+
announcements?: Array<FtSearchResultAnnouncement>;
|
|
786
789
|
facets: Array<FtSearchFacet>;
|
|
787
790
|
}
|
|
788
791
|
export declare const isFtSearchResults: (o: any) => o is FtSearchResults;
|
|
@@ -841,10 +844,11 @@ export interface FtSearchRequest {
|
|
|
841
844
|
query: string;
|
|
842
845
|
paging: FtPageRequest;
|
|
843
846
|
/** @deprecated */ filters?: Array<FtLegacyMetadataFilter>;
|
|
844
|
-
sort
|
|
847
|
+
/** @deprecated */ sort?: Array<FtSearchSortCriterion>;
|
|
845
848
|
virtualField?: FtVirtualFieldKeys;
|
|
846
849
|
metadataFilters: Array<FtMetadataFilter>;
|
|
847
850
|
facets: Array<FtSearchFacetConf>;
|
|
851
|
+
sortId?: string;
|
|
848
852
|
scope?: FtSearchScopeKeys;
|
|
849
853
|
/** @deprecated */ lastModified?: any;
|
|
850
854
|
uiLocale?: string;
|
|
@@ -853,6 +857,12 @@ export interface FtSearchRequest {
|
|
|
853
857
|
clusterSortCriterions?: Array<FtPublicClusterSortCriterion>;
|
|
854
858
|
}
|
|
855
859
|
export declare const isFtSearchRequest: (o: any) => o is FtSearchRequest;
|
|
860
|
+
export interface FtSearchResultAnnouncement {
|
|
861
|
+
link: string;
|
|
862
|
+
text: string;
|
|
863
|
+
title: string;
|
|
864
|
+
}
|
|
865
|
+
export declare const isFtSearchResultAnnouncement: (o: any) => o is FtSearchResultAnnouncement;
|
|
856
866
|
export interface FtSearchResultCluster {
|
|
857
867
|
entries: Array<FtSearchResultClusterEntry>;
|
|
858
868
|
metadataVariableAxis?: string;
|
|
@@ -982,8 +992,16 @@ export interface FtTopicResource {
|
|
|
982
992
|
viewerUrl: string;
|
|
983
993
|
}
|
|
984
994
|
export declare const isFtTopicResource: (o: any) => o is FtTopicResource;
|
|
995
|
+
export declare enum FtLocalizableLabelType {
|
|
996
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
997
|
+
LOCALIZED_OFFICIAL = "LOCALIZED_OFFICIAL",
|
|
998
|
+
LOCALIZED_CUSTOM = "LOCALIZED_CUSTOM"
|
|
999
|
+
}
|
|
1000
|
+
export type FtLocalizableLabelTypeKeys = keyof typeof FtLocalizableLabelType;
|
|
1001
|
+
export declare const isFtLocalizableLabelType: (o: any) => o is FtLocalizableLabelType;
|
|
985
1002
|
export interface FtSuggestRequest {
|
|
986
1003
|
input: string;
|
|
1004
|
+
sortId?: string;
|
|
987
1005
|
scope?: FtSearchScopeKeys;
|
|
988
1006
|
sort: Array<FtSearchSortCriterion>;
|
|
989
1007
|
maxCount?: number;
|
|
@@ -1021,6 +1039,7 @@ export declare enum FtUserRole {
|
|
|
1021
1039
|
GENERATIVE_AI_USER = "GENERATIVE_AI_USER",
|
|
1022
1040
|
GENERATIVE_AI_EXPORT_USER = "GENERATIVE_AI_EXPORT_USER",
|
|
1023
1041
|
CONTENT_PUBLISHER = "CONTENT_PUBLISHER",
|
|
1042
|
+
ANNOUNCEMENT_ADMIN = "ANNOUNCEMENT_ADMIN",
|
|
1024
1043
|
KHUB_ADMIN = "KHUB_ADMIN",
|
|
1025
1044
|
USERS_ADMIN = "USERS_ADMIN",
|
|
1026
1045
|
PORTAL_ADMIN = "PORTAL_ADMIN",
|
|
@@ -1080,3 +1099,20 @@ export interface FtWatermark {
|
|
|
1080
1099
|
opacity: number;
|
|
1081
1100
|
}
|
|
1082
1101
|
export declare const isFtWatermark: (o: any) => o is FtWatermark;
|
|
1102
|
+
export interface FtLocalizableLabel {
|
|
1103
|
+
context: string;
|
|
1104
|
+
text: string;
|
|
1105
|
+
type: FtLocalizableLabelTypeKeys;
|
|
1106
|
+
key: string;
|
|
1107
|
+
}
|
|
1108
|
+
export declare const isFtLocalizableLabel: (o: any) => o is FtLocalizableLabel;
|
|
1109
|
+
export interface FtSearchConfiguration {
|
|
1110
|
+
sortOptions: Array<FtSearchSortOption>;
|
|
1111
|
+
}
|
|
1112
|
+
export declare const isFtSearchConfiguration: (o: any) => o is FtSearchConfiguration;
|
|
1113
|
+
export interface FtSearchSortOption {
|
|
1114
|
+
id: string;
|
|
1115
|
+
label: FtLocalizableLabel;
|
|
1116
|
+
sortCriteria: Array<FtSearchSortCriterion>;
|
|
1117
|
+
}
|
|
1118
|
+
export declare const isFtSearchSortOption: (o: any) => o is FtSearchSortOption;
|
|
@@ -542,6 +542,7 @@ export var FtExternalWebComponentContext;
|
|
|
542
542
|
FtExternalWebComponentContext["TOPIC_TEMPLATE"] = "TOPIC_TEMPLATE";
|
|
543
543
|
FtExternalWebComponentContext["SEARCH"] = "SEARCH";
|
|
544
544
|
FtExternalWebComponentContext["SEARCH_RESULT"] = "SEARCH_RESULT";
|
|
545
|
+
FtExternalWebComponentContext["SEARCH_ANNOUNCEMENT"] = "SEARCH_ANNOUNCEMENT";
|
|
545
546
|
})(FtExternalWebComponentContext || (FtExternalWebComponentContext = {}));
|
|
546
547
|
export const isFtExternalWebComponentContext = (o) => Object.keys(FtExternalWebComponentContext).includes(o);
|
|
547
548
|
export const isFtFeedbackCreation = (o) => {
|
|
@@ -662,11 +663,12 @@ export const isFtMySearchCreation = (o) => {
|
|
|
662
663
|
export const isFtMySearchRequest = (o) => {
|
|
663
664
|
return isObject(o)
|
|
664
665
|
&& (o.periodFilter == null || isFtPeriodFilter(o.periodFilter))
|
|
666
|
+
&& (o.sortId == null || isString(o.sortId))
|
|
665
667
|
&& (isString(o.query))
|
|
666
668
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
667
669
|
&& (o.filters == null || (Array.isArray(o.filters)
|
|
668
670
|
&& o.filters.every((v) => isFtLegacyLabeledMetadataFilter(v))))
|
|
669
|
-
&& ((Array.isArray(o.sort)
|
|
671
|
+
&& (o.sort == null || (Array.isArray(o.sort)
|
|
670
672
|
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
671
673
|
&& (o.virtualField == null || isFtVirtualField(o.virtualField))
|
|
672
674
|
&& (o.metadataFilters == null || (Array.isArray(o.metadataFilters)
|
|
@@ -850,6 +852,8 @@ export const isFtSearchResults = (o) => {
|
|
|
850
852
|
&& (isFtSearchResultsPageInfo(o.paging))
|
|
851
853
|
&& ((Array.isArray(o.results)
|
|
852
854
|
&& o.results.every((v) => isFtSearchResultCluster(v))))
|
|
855
|
+
&& (o.announcements == null || (Array.isArray(o.announcements)
|
|
856
|
+
&& o.announcements.every((v) => isFtSearchResultAnnouncement(v))))
|
|
853
857
|
&& ((Array.isArray(o.facets)
|
|
854
858
|
&& o.facets.every((v) => isFtSearchFacet(v))));
|
|
855
859
|
};
|
|
@@ -912,13 +916,14 @@ export const isFtSearchRequest = (o) => {
|
|
|
912
916
|
&& (isFtPageRequest(o.paging))
|
|
913
917
|
&& (o.filters == null || (Array.isArray(o.filters)
|
|
914
918
|
&& o.filters.every((v) => isFtLegacyMetadataFilter(v))))
|
|
915
|
-
&& ((Array.isArray(o.sort)
|
|
919
|
+
&& (o.sort == null || (Array.isArray(o.sort)
|
|
916
920
|
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
917
921
|
&& (o.virtualField == null || isFtVirtualField(o.virtualField))
|
|
918
922
|
&& ((Array.isArray(o.metadataFilters)
|
|
919
923
|
&& o.metadataFilters.every((v) => isFtMetadataFilter(v))))
|
|
920
924
|
&& ((Array.isArray(o.facets)
|
|
921
925
|
&& o.facets.every((v) => isFtSearchFacetConf(v))))
|
|
926
|
+
&& (o.sortId == null || isString(o.sortId))
|
|
922
927
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
923
928
|
&& (o.uiLocale == null || isString(o.uiLocale))
|
|
924
929
|
&& (o.contentLocale == null || isString(o.contentLocale))
|
|
@@ -927,6 +932,12 @@ export const isFtSearchRequest = (o) => {
|
|
|
927
932
|
&& (o.clusterSortCriterions == null || (Array.isArray(o.clusterSortCriterions)
|
|
928
933
|
&& o.clusterSortCriterions.every((v) => isFtPublicClusterSortCriterion(v))));
|
|
929
934
|
};
|
|
935
|
+
export const isFtSearchResultAnnouncement = (o) => {
|
|
936
|
+
return isObject(o)
|
|
937
|
+
&& (isString(o.link))
|
|
938
|
+
&& (isString(o.text))
|
|
939
|
+
&& (isString(o.title));
|
|
940
|
+
};
|
|
930
941
|
export const isFtSearchResultCluster = (o) => {
|
|
931
942
|
return isObject(o)
|
|
932
943
|
&& ((Array.isArray(o.entries)
|
|
@@ -1065,9 +1076,18 @@ export const isFtTopicResource = (o) => {
|
|
|
1065
1076
|
&& (isString(o.resourceContentUrl))
|
|
1066
1077
|
&& (isString(o.viewerUrl));
|
|
1067
1078
|
};
|
|
1079
|
+
// From: LocalizableLabelType
|
|
1080
|
+
export var FtLocalizableLabelType;
|
|
1081
|
+
(function (FtLocalizableLabelType) {
|
|
1082
|
+
FtLocalizableLabelType["PLAIN_TEXT"] = "PLAIN_TEXT";
|
|
1083
|
+
FtLocalizableLabelType["LOCALIZED_OFFICIAL"] = "LOCALIZED_OFFICIAL";
|
|
1084
|
+
FtLocalizableLabelType["LOCALIZED_CUSTOM"] = "LOCALIZED_CUSTOM";
|
|
1085
|
+
})(FtLocalizableLabelType || (FtLocalizableLabelType = {}));
|
|
1086
|
+
export const isFtLocalizableLabelType = (o) => Object.keys(FtLocalizableLabelType).includes(o);
|
|
1068
1087
|
export const isFtSuggestRequest = (o) => {
|
|
1069
1088
|
return isObject(o)
|
|
1070
1089
|
&& (isString(o.input))
|
|
1090
|
+
&& (o.sortId == null || isString(o.sortId))
|
|
1071
1091
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
1072
1092
|
&& ((Array.isArray(o.sort)
|
|
1073
1093
|
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
@@ -1109,6 +1129,7 @@ export var FtUserRole;
|
|
|
1109
1129
|
FtUserRole["GENERATIVE_AI_USER"] = "GENERATIVE_AI_USER";
|
|
1110
1130
|
FtUserRole["GENERATIVE_AI_EXPORT_USER"] = "GENERATIVE_AI_EXPORT_USER";
|
|
1111
1131
|
FtUserRole["CONTENT_PUBLISHER"] = "CONTENT_PUBLISHER";
|
|
1132
|
+
FtUserRole["ANNOUNCEMENT_ADMIN"] = "ANNOUNCEMENT_ADMIN";
|
|
1112
1133
|
FtUserRole["KHUB_ADMIN"] = "KHUB_ADMIN";
|
|
1113
1134
|
FtUserRole["USERS_ADMIN"] = "USERS_ADMIN";
|
|
1114
1135
|
FtUserRole["PORTAL_ADMIN"] = "PORTAL_ADMIN";
|
|
@@ -1173,3 +1194,22 @@ export const isFtWatermark = (o) => {
|
|
|
1173
1194
|
&& o.text.every((v) => isString(v))))
|
|
1174
1195
|
&& (isNumber(o.opacity));
|
|
1175
1196
|
};
|
|
1197
|
+
export const isFtLocalizableLabel = (o) => {
|
|
1198
|
+
return isObject(o)
|
|
1199
|
+
&& (isString(o.context))
|
|
1200
|
+
&& (isString(o.text))
|
|
1201
|
+
&& (isFtLocalizableLabelType(o.type))
|
|
1202
|
+
&& (isString(o.key));
|
|
1203
|
+
};
|
|
1204
|
+
export const isFtSearchConfiguration = (o) => {
|
|
1205
|
+
return isObject(o)
|
|
1206
|
+
&& ((Array.isArray(o.sortOptions)
|
|
1207
|
+
&& o.sortOptions.every((v) => isFtSearchSortOption(v))));
|
|
1208
|
+
};
|
|
1209
|
+
export const isFtSearchSortOption = (o) => {
|
|
1210
|
+
return isObject(o)
|
|
1211
|
+
&& (isString(o.id))
|
|
1212
|
+
&& (isFtLocalizableLabel(o.label))
|
|
1213
|
+
&& ((Array.isArray(o.sortCriteria)
|
|
1214
|
+
&& o.sortCriteria.every((v) => isFtSearchSortCriterion(v))));
|
|
1215
|
+
};
|
package/package.json
CHANGED
package/.npmignore
DELETED
package/.yarnrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--frozen-lockfile false
|