@fluid-topics/public-api 1.0.101 → 1.0.103
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/index.js +4 -0
- package/dist/cjs/types/ft-common/public.js +62 -14
- 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 +42 -7
- package/dist/mjs/types/ft-common/public.js +54 -11
- package/package.json +1 -1
- package/yarn.lock +4323 -0
|
@@ -357,6 +357,7 @@ export interface FtPersonalBookCreation {
|
|
|
357
357
|
nodes: Array<FtPersonalBookNodeCreation>;
|
|
358
358
|
description: string;
|
|
359
359
|
title: string;
|
|
360
|
+
labels: Array<string>;
|
|
360
361
|
}
|
|
361
362
|
export declare const isFtPersonalBookCreation: (o: any) => o is FtPersonalBookCreation;
|
|
362
363
|
export interface FtPersonalBookMetadataUpdate {
|
|
@@ -381,7 +382,7 @@ export interface FtPersonalBookTopicLinkCreation {
|
|
|
381
382
|
export declare const isFtPersonalBookTopicLinkCreation: (o: any) => o is FtPersonalBookTopicLinkCreation;
|
|
382
383
|
export interface FtBookmark {
|
|
383
384
|
mapTitle: string;
|
|
384
|
-
color
|
|
385
|
+
/** @deprecated */ color?: FtMyLibraryColorsKeys;
|
|
385
386
|
breadcrumb: Array<string>;
|
|
386
387
|
tocId: string;
|
|
387
388
|
lastUpdate: Date | string;
|
|
@@ -390,6 +391,7 @@ export interface FtBookmark {
|
|
|
390
391
|
id: string;
|
|
391
392
|
title: string;
|
|
392
393
|
creationDate: Date | string;
|
|
394
|
+
labels: Array<string>;
|
|
393
395
|
}
|
|
394
396
|
export declare const isFtBookmark: (o: any) => o is FtBookmark;
|
|
395
397
|
export interface FtCollectionDocument {
|
|
@@ -561,6 +563,10 @@ export interface FtUiLocale {
|
|
|
561
563
|
translated: boolean;
|
|
562
564
|
}
|
|
563
565
|
export declare const isFtUiLocale: (o: any) => o is FtUiLocale;
|
|
566
|
+
export interface FtUserAssetLabel {
|
|
567
|
+
title: string;
|
|
568
|
+
}
|
|
569
|
+
export declare const isFtUserAssetLabel: (o: any) => o is FtUserAssetLabel;
|
|
564
570
|
export declare enum FtFacetType {
|
|
565
571
|
AND = "AND",
|
|
566
572
|
OR = "OR",
|
|
@@ -596,29 +602,31 @@ export interface FtMetadataDescriptor {
|
|
|
596
602
|
export declare const isFtMetadataDescriptor: (o: any) => o is FtMetadataDescriptor;
|
|
597
603
|
export interface FtMySearch {
|
|
598
604
|
searchRequest: FtMySearchRequest;
|
|
599
|
-
color
|
|
605
|
+
/** @deprecated */ color?: FtMyLibraryColorsKeys;
|
|
600
606
|
alert: boolean;
|
|
601
607
|
description: string;
|
|
602
608
|
id: string;
|
|
603
609
|
ownerId: string;
|
|
604
610
|
title: string;
|
|
605
611
|
creationDate: Date | string;
|
|
612
|
+
labels: Array<string>;
|
|
606
613
|
}
|
|
607
614
|
export declare const isFtMySearch: (o: any) => o is FtMySearch;
|
|
608
615
|
export interface FtMySearchCreation {
|
|
609
616
|
searchRequest: FtMySearchRequest;
|
|
610
|
-
color: FtMyLibraryColorsKeys;
|
|
611
617
|
alert: boolean;
|
|
612
618
|
description: string;
|
|
613
619
|
title: string;
|
|
620
|
+
labels: Array<string>;
|
|
614
621
|
}
|
|
615
622
|
export declare const isFtMySearchCreation: (o: any) => o is FtMySearchCreation;
|
|
616
623
|
export interface FtMySearchRequest {
|
|
617
624
|
/** @deprecated */ periodFilter?: FtPeriodFilter;
|
|
625
|
+
sortId?: string;
|
|
618
626
|
query: string;
|
|
619
627
|
scope?: FtSearchScopeKeys;
|
|
620
628
|
/** @deprecated */ filters?: Array<FtLegacyLabeledMetadataFilter>;
|
|
621
|
-
sort
|
|
629
|
+
sort?: Array<FtSearchSortCriterion>;
|
|
622
630
|
virtualField?: FtVirtualFieldKeys;
|
|
623
631
|
metadataFilters?: Array<FtLabeledMetadataFilter>;
|
|
624
632
|
contentLocale?: string;
|
|
@@ -626,10 +634,10 @@ export interface FtMySearchRequest {
|
|
|
626
634
|
export declare const isFtMySearchRequest: (o: any) => o is FtMySearchRequest;
|
|
627
635
|
export interface FtMySearchUpdate {
|
|
628
636
|
searchRequest?: FtMySearchRequest;
|
|
629
|
-
color?: FtMyLibraryColorsKeys;
|
|
630
637
|
alert?: boolean;
|
|
631
638
|
description?: string;
|
|
632
639
|
title?: string;
|
|
640
|
+
labels?: Array<string>;
|
|
633
641
|
}
|
|
634
642
|
export declare const isFtMySearchUpdate: (o: any) => o is FtMySearchUpdate;
|
|
635
643
|
export interface FtPrivacyPolicyConfiguration {
|
|
@@ -740,7 +748,8 @@ export declare const isFtSearchResultsPageInfo: (o: any) => o is FtSearchResults
|
|
|
740
748
|
export declare enum FtEditorialType {
|
|
741
749
|
ARTICLE = "ARTICLE",
|
|
742
750
|
BOOK = "BOOK",
|
|
743
|
-
SHARED_BOOK = "SHARED_BOOK"
|
|
751
|
+
SHARED_BOOK = "SHARED_BOOK",
|
|
752
|
+
HTMLPACKAGE = "HTMLPACKAGE"
|
|
744
753
|
}
|
|
745
754
|
export type FtEditorialTypeKeys = keyof typeof FtEditorialType;
|
|
746
755
|
export declare const isFtEditorialType: (o: any) => o is FtEditorialType;
|
|
@@ -843,10 +852,11 @@ export interface FtSearchRequest {
|
|
|
843
852
|
query: string;
|
|
844
853
|
paging: FtPageRequest;
|
|
845
854
|
/** @deprecated */ filters?: Array<FtLegacyMetadataFilter>;
|
|
846
|
-
sort
|
|
855
|
+
/** @deprecated */ sort?: Array<FtSearchSortCriterion>;
|
|
847
856
|
virtualField?: FtVirtualFieldKeys;
|
|
848
857
|
metadataFilters: Array<FtMetadataFilter>;
|
|
849
858
|
facets: Array<FtSearchFacetConf>;
|
|
859
|
+
sortId?: string;
|
|
850
860
|
scope?: FtSearchScopeKeys;
|
|
851
861
|
/** @deprecated */ lastModified?: any;
|
|
852
862
|
uiLocale?: string;
|
|
@@ -990,8 +1000,16 @@ export interface FtTopicResource {
|
|
|
990
1000
|
viewerUrl: string;
|
|
991
1001
|
}
|
|
992
1002
|
export declare const isFtTopicResource: (o: any) => o is FtTopicResource;
|
|
1003
|
+
export declare enum FtLocalizableLabelType {
|
|
1004
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
1005
|
+
LOCALIZED_OFFICIAL = "LOCALIZED_OFFICIAL",
|
|
1006
|
+
LOCALIZED_CUSTOM = "LOCALIZED_CUSTOM"
|
|
1007
|
+
}
|
|
1008
|
+
export type FtLocalizableLabelTypeKeys = keyof typeof FtLocalizableLabelType;
|
|
1009
|
+
export declare const isFtLocalizableLabelType: (o: any) => o is FtLocalizableLabelType;
|
|
993
1010
|
export interface FtSuggestRequest {
|
|
994
1011
|
input: string;
|
|
1012
|
+
sortId?: string;
|
|
995
1013
|
scope?: FtSearchScopeKeys;
|
|
996
1014
|
sort: Array<FtSearchSortCriterion>;
|
|
997
1015
|
maxCount?: number;
|
|
@@ -1089,3 +1107,20 @@ export interface FtWatermark {
|
|
|
1089
1107
|
opacity: number;
|
|
1090
1108
|
}
|
|
1091
1109
|
export declare const isFtWatermark: (o: any) => o is FtWatermark;
|
|
1110
|
+
export interface FtLocalizableLabel {
|
|
1111
|
+
context: string;
|
|
1112
|
+
text: string;
|
|
1113
|
+
type: FtLocalizableLabelTypeKeys;
|
|
1114
|
+
key: string;
|
|
1115
|
+
}
|
|
1116
|
+
export declare const isFtLocalizableLabel: (o: any) => o is FtLocalizableLabel;
|
|
1117
|
+
export interface FtSearchConfiguration {
|
|
1118
|
+
sortOptions: Array<FtSearchSortOption>;
|
|
1119
|
+
}
|
|
1120
|
+
export declare const isFtSearchConfiguration: (o: any) => o is FtSearchConfiguration;
|
|
1121
|
+
export interface FtSearchSortOption {
|
|
1122
|
+
id: string;
|
|
1123
|
+
label: FtLocalizableLabel;
|
|
1124
|
+
sortCriteria: Array<FtSearchSortCriterion>;
|
|
1125
|
+
}
|
|
1126
|
+
export declare const isFtSearchSortOption: (o: any) => o is FtSearchSortOption;
|
|
@@ -381,7 +381,9 @@ export const isFtPersonalBookCreation = (o) => {
|
|
|
381
381
|
&& ((Array.isArray(o.nodes)
|
|
382
382
|
&& o.nodes.every((v) => isFtPersonalBookNodeCreation(v))))
|
|
383
383
|
&& (isString(o.description))
|
|
384
|
-
&& (isString(o.title))
|
|
384
|
+
&& (isString(o.title))
|
|
385
|
+
&& ((Array.isArray(o.labels)
|
|
386
|
+
&& o.labels.every((v) => isString(v))));
|
|
385
387
|
};
|
|
386
388
|
export const isFtPersonalBookMetadataUpdate = (o) => {
|
|
387
389
|
return isObject(o)
|
|
@@ -408,7 +410,7 @@ export const isFtPersonalBookTopicLinkCreation = (o) => {
|
|
|
408
410
|
export const isFtBookmark = (o) => {
|
|
409
411
|
return isObject(o)
|
|
410
412
|
&& (isString(o.mapTitle))
|
|
411
|
-
&& (isFtMyLibraryColors(o.color))
|
|
413
|
+
&& (o.color == null || isFtMyLibraryColors(o.color))
|
|
412
414
|
&& ((Array.isArray(o.breadcrumb)
|
|
413
415
|
&& o.breadcrumb.every((v) => isString(v))))
|
|
414
416
|
&& (isString(o.tocId))
|
|
@@ -417,7 +419,9 @@ export const isFtBookmark = (o) => {
|
|
|
417
419
|
&& (isString(o.mapId))
|
|
418
420
|
&& (isString(o.id))
|
|
419
421
|
&& (isString(o.title))
|
|
420
|
-
&& (isString(o.creationDate))
|
|
422
|
+
&& (isString(o.creationDate))
|
|
423
|
+
&& ((Array.isArray(o.labels)
|
|
424
|
+
&& o.labels.every((v) => isString(v))));
|
|
421
425
|
};
|
|
422
426
|
export const isFtCollectionDocument = (o) => {
|
|
423
427
|
return isObject(o)
|
|
@@ -602,6 +606,10 @@ export const isFtUiLocale = (o) => {
|
|
|
602
606
|
&& (isString(o.languageTag))
|
|
603
607
|
&& (isBoolean(o.translated));
|
|
604
608
|
};
|
|
609
|
+
export const isFtUserAssetLabel = (o) => {
|
|
610
|
+
return isObject(o)
|
|
611
|
+
&& (isString(o.title));
|
|
612
|
+
};
|
|
605
613
|
// From: WsFacetType
|
|
606
614
|
export var FtFacetType;
|
|
607
615
|
(function (FtFacetType) {
|
|
@@ -644,30 +652,34 @@ export const isFtMetadataDescriptor = (o) => {
|
|
|
644
652
|
export const isFtMySearch = (o) => {
|
|
645
653
|
return isObject(o)
|
|
646
654
|
&& (isFtMySearchRequest(o.searchRequest))
|
|
647
|
-
&& (isFtMyLibraryColors(o.color))
|
|
655
|
+
&& (o.color == null || isFtMyLibraryColors(o.color))
|
|
648
656
|
&& (isBoolean(o.alert))
|
|
649
657
|
&& (isString(o.description))
|
|
650
658
|
&& (isString(o.id))
|
|
651
659
|
&& (isString(o.ownerId))
|
|
652
660
|
&& (isString(o.title))
|
|
653
|
-
&& (isString(o.creationDate))
|
|
661
|
+
&& (isString(o.creationDate))
|
|
662
|
+
&& ((Array.isArray(o.labels)
|
|
663
|
+
&& o.labels.every((v) => isString(v))));
|
|
654
664
|
};
|
|
655
665
|
export const isFtMySearchCreation = (o) => {
|
|
656
666
|
return isObject(o)
|
|
657
667
|
&& (isFtMySearchRequest(o.searchRequest))
|
|
658
|
-
&& (isFtMyLibraryColors(o.color))
|
|
659
668
|
&& (isBoolean(o.alert))
|
|
660
669
|
&& (isString(o.description))
|
|
661
|
-
&& (isString(o.title))
|
|
670
|
+
&& (isString(o.title))
|
|
671
|
+
&& ((Array.isArray(o.labels)
|
|
672
|
+
&& o.labels.every((v) => isString(v))));
|
|
662
673
|
};
|
|
663
674
|
export const isFtMySearchRequest = (o) => {
|
|
664
675
|
return isObject(o)
|
|
665
676
|
&& (o.periodFilter == null || isFtPeriodFilter(o.periodFilter))
|
|
677
|
+
&& (o.sortId == null || isString(o.sortId))
|
|
666
678
|
&& (isString(o.query))
|
|
667
679
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
668
680
|
&& (o.filters == null || (Array.isArray(o.filters)
|
|
669
681
|
&& o.filters.every((v) => isFtLegacyLabeledMetadataFilter(v))))
|
|
670
|
-
&& ((Array.isArray(o.sort)
|
|
682
|
+
&& (o.sort == null || (Array.isArray(o.sort)
|
|
671
683
|
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
672
684
|
&& (o.virtualField == null || isFtVirtualField(o.virtualField))
|
|
673
685
|
&& (o.metadataFilters == null || (Array.isArray(o.metadataFilters)
|
|
@@ -677,10 +689,11 @@ export const isFtMySearchRequest = (o) => {
|
|
|
677
689
|
export const isFtMySearchUpdate = (o) => {
|
|
678
690
|
return isObject(o)
|
|
679
691
|
&& (o.searchRequest == null || isFtMySearchRequest(o.searchRequest))
|
|
680
|
-
&& (o.color == null || isFtMyLibraryColors(o.color))
|
|
681
692
|
&& (o.alert == null || isBoolean(o.alert))
|
|
682
693
|
&& (o.description == null || isString(o.description))
|
|
683
|
-
&& (o.title == null || isString(o.title))
|
|
694
|
+
&& (o.title == null || isString(o.title))
|
|
695
|
+
&& (o.labels == null || (Array.isArray(o.labels)
|
|
696
|
+
&& o.labels.every((v) => isString(v))));
|
|
684
697
|
};
|
|
685
698
|
export const isFtPrivacyPolicyConfiguration = (o) => {
|
|
686
699
|
return isObject(o)
|
|
@@ -804,6 +817,7 @@ export var FtEditorialType;
|
|
|
804
817
|
FtEditorialType["ARTICLE"] = "ARTICLE";
|
|
805
818
|
FtEditorialType["BOOK"] = "BOOK";
|
|
806
819
|
FtEditorialType["SHARED_BOOK"] = "SHARED_BOOK";
|
|
820
|
+
FtEditorialType["HTMLPACKAGE"] = "HTMLPACKAGE";
|
|
807
821
|
})(FtEditorialType || (FtEditorialType = {}));
|
|
808
822
|
export const isFtEditorialType = (o) => Object.keys(FtEditorialType).includes(o);
|
|
809
823
|
// From: WsOpenMode
|
|
@@ -915,13 +929,14 @@ export const isFtSearchRequest = (o) => {
|
|
|
915
929
|
&& (isFtPageRequest(o.paging))
|
|
916
930
|
&& (o.filters == null || (Array.isArray(o.filters)
|
|
917
931
|
&& o.filters.every((v) => isFtLegacyMetadataFilter(v))))
|
|
918
|
-
&& ((Array.isArray(o.sort)
|
|
932
|
+
&& (o.sort == null || (Array.isArray(o.sort)
|
|
919
933
|
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
920
934
|
&& (o.virtualField == null || isFtVirtualField(o.virtualField))
|
|
921
935
|
&& ((Array.isArray(o.metadataFilters)
|
|
922
936
|
&& o.metadataFilters.every((v) => isFtMetadataFilter(v))))
|
|
923
937
|
&& ((Array.isArray(o.facets)
|
|
924
938
|
&& o.facets.every((v) => isFtSearchFacetConf(v))))
|
|
939
|
+
&& (o.sortId == null || isString(o.sortId))
|
|
925
940
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
926
941
|
&& (o.uiLocale == null || isString(o.uiLocale))
|
|
927
942
|
&& (o.contentLocale == null || isString(o.contentLocale))
|
|
@@ -1074,9 +1089,18 @@ export const isFtTopicResource = (o) => {
|
|
|
1074
1089
|
&& (isString(o.resourceContentUrl))
|
|
1075
1090
|
&& (isString(o.viewerUrl));
|
|
1076
1091
|
};
|
|
1092
|
+
// From: LocalizableLabelType
|
|
1093
|
+
export var FtLocalizableLabelType;
|
|
1094
|
+
(function (FtLocalizableLabelType) {
|
|
1095
|
+
FtLocalizableLabelType["PLAIN_TEXT"] = "PLAIN_TEXT";
|
|
1096
|
+
FtLocalizableLabelType["LOCALIZED_OFFICIAL"] = "LOCALIZED_OFFICIAL";
|
|
1097
|
+
FtLocalizableLabelType["LOCALIZED_CUSTOM"] = "LOCALIZED_CUSTOM";
|
|
1098
|
+
})(FtLocalizableLabelType || (FtLocalizableLabelType = {}));
|
|
1099
|
+
export const isFtLocalizableLabelType = (o) => Object.keys(FtLocalizableLabelType).includes(o);
|
|
1077
1100
|
export const isFtSuggestRequest = (o) => {
|
|
1078
1101
|
return isObject(o)
|
|
1079
1102
|
&& (isString(o.input))
|
|
1103
|
+
&& (o.sortId == null || isString(o.sortId))
|
|
1080
1104
|
&& (o.scope == null || isFtSearchScope(o.scope))
|
|
1081
1105
|
&& ((Array.isArray(o.sort)
|
|
1082
1106
|
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
@@ -1183,3 +1207,22 @@ export const isFtWatermark = (o) => {
|
|
|
1183
1207
|
&& o.text.every((v) => isString(v))))
|
|
1184
1208
|
&& (isNumber(o.opacity));
|
|
1185
1209
|
};
|
|
1210
|
+
export const isFtLocalizableLabel = (o) => {
|
|
1211
|
+
return isObject(o)
|
|
1212
|
+
&& (isString(o.context))
|
|
1213
|
+
&& (isString(o.text))
|
|
1214
|
+
&& (isFtLocalizableLabelType(o.type))
|
|
1215
|
+
&& (isString(o.key));
|
|
1216
|
+
};
|
|
1217
|
+
export const isFtSearchConfiguration = (o) => {
|
|
1218
|
+
return isObject(o)
|
|
1219
|
+
&& ((Array.isArray(o.sortOptions)
|
|
1220
|
+
&& o.sortOptions.every((v) => isFtSearchSortOption(v))));
|
|
1221
|
+
};
|
|
1222
|
+
export const isFtSearchSortOption = (o) => {
|
|
1223
|
+
return isObject(o)
|
|
1224
|
+
&& (isString(o.id))
|
|
1225
|
+
&& (isFtLocalizableLabel(o.label))
|
|
1226
|
+
&& ((Array.isArray(o.sortCriteria)
|
|
1227
|
+
&& o.sortCriteria.every((v) => isFtSearchSortCriterion(v))));
|
|
1228
|
+
};
|