@fluid-topics/public-api 1.0.13 → 1.0.14
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.cjs +166 -0
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/types/ft-common/public.cjs +374 -0
- package/dist/cjs/types/ft-common/public.js +222 -2
- package/dist/cjs/types/ft-server/public.cjs +31 -0
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/index.d.ts +4 -1
- package/dist/mjs/index.js +9 -0
- package/dist/mjs/index.mjs +153 -0
- package/dist/mjs/types/ft-common/public.d.ts +182 -1
- package/dist/mjs/types/ft-common/public.js +199 -1
- package/dist/mjs/types/ft-common/public.mjs +336 -0
- package/dist/mjs/types/ft-server/public.mjs +25 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ export interface FtCollectionDocument {
|
|
|
11
11
|
portalUrl?: string;
|
|
12
12
|
id: string;
|
|
13
13
|
title: string;
|
|
14
|
-
type:
|
|
14
|
+
type: FtCollectionDocumentType;
|
|
15
15
|
}
|
|
16
16
|
export declare const isFtCollectionDocument: (o: any) => o is FtCollectionDocument;
|
|
17
17
|
export interface FtMap {
|
|
@@ -77,6 +77,16 @@ export declare enum FtTopicContentTarget {
|
|
|
77
77
|
OFF_THE_GRID = "OFF_THE_GRID"
|
|
78
78
|
}
|
|
79
79
|
export declare const isFtTopicContentTarget: (o: any) => o is FtTopicContentTarget;
|
|
80
|
+
export interface FtSearchLocale {
|
|
81
|
+
count: number;
|
|
82
|
+
label: string;
|
|
83
|
+
lang?: string;
|
|
84
|
+
}
|
|
85
|
+
export declare const isFtSearchLocale: (o: any) => o is FtSearchLocale;
|
|
86
|
+
export interface FtSearchLocales {
|
|
87
|
+
contentLocales: Array<FtSearchLocale>;
|
|
88
|
+
}
|
|
89
|
+
export declare const isFtSearchLocales: (o: any) => o is FtSearchLocales;
|
|
80
90
|
export interface FtMetadata {
|
|
81
91
|
values: Array<string>;
|
|
82
92
|
label: string;
|
|
@@ -90,6 +100,19 @@ export interface FtMapResource {
|
|
|
90
100
|
mimeType: string;
|
|
91
101
|
}
|
|
92
102
|
export declare const isFtMapResource: (o: any) => o is FtMapResource;
|
|
103
|
+
export interface FtSearchFilter {
|
|
104
|
+
negative: boolean;
|
|
105
|
+
values: Array<string>;
|
|
106
|
+
key: string;
|
|
107
|
+
}
|
|
108
|
+
export declare const isFtSearchFilter: (o: any) => o is FtSearchFilter;
|
|
109
|
+
export interface FtSearchResultsPageInfo {
|
|
110
|
+
totalResultsCount: number;
|
|
111
|
+
lastPage: boolean;
|
|
112
|
+
currentPage: number;
|
|
113
|
+
totalClustersCount: number;
|
|
114
|
+
}
|
|
115
|
+
export declare const isFtSearchResultsPageInfo: (o: any) => o is FtSearchResultsPageInfo;
|
|
93
116
|
export declare enum FtEditorialType {
|
|
94
117
|
ARTICLE = "ARTICLE",
|
|
95
118
|
BOOK = "BOOK"
|
|
@@ -100,12 +123,170 @@ export declare enum FtOpenMode {
|
|
|
100
123
|
EXTERNAL = "EXTERNAL"
|
|
101
124
|
}
|
|
102
125
|
export declare const isFtOpenMode: (o: any) => o is FtOpenMode;
|
|
126
|
+
export interface FtPageRequest {
|
|
127
|
+
perPage?: number;
|
|
128
|
+
page: number;
|
|
129
|
+
}
|
|
130
|
+
export declare const isFtPageRequest: (o: any) => o is FtPageRequest;
|
|
131
|
+
export declare enum FtCollectionDocumentType {
|
|
132
|
+
MAP = "MAP",
|
|
133
|
+
DOCUMENT = "DOCUMENT",
|
|
134
|
+
TOPIC = "TOPIC",
|
|
135
|
+
PERSONAL_BOOK = "PERSONAL_BOOK",
|
|
136
|
+
SHARED_BOOK = "SHARED_BOOK"
|
|
137
|
+
}
|
|
138
|
+
export declare const isFtCollectionDocumentType: (o: any) => o is FtCollectionDocumentType;
|
|
139
|
+
export interface FtSearchResults {
|
|
140
|
+
spellcheck?: FtSpellcheck;
|
|
141
|
+
paging: FtSearchResultsPageInfo;
|
|
142
|
+
results: Array<FtSearchResultCluster>;
|
|
143
|
+
facets: Array<FtSearchFacet>;
|
|
144
|
+
}
|
|
145
|
+
export declare const isFtSearchResults: (o: any) => o is FtSearchResults;
|
|
146
|
+
export interface FtSearchRequest {
|
|
147
|
+
query: string;
|
|
148
|
+
paging: FtPageRequest;
|
|
149
|
+
filters: Array<FtSearchFilter>;
|
|
150
|
+
sort: Array<FtSearchSortCriterion>;
|
|
151
|
+
uiLocale?: string;
|
|
152
|
+
contentLocale?: string;
|
|
153
|
+
facets: Array<FtSearchFacetConf>;
|
|
154
|
+
}
|
|
155
|
+
export declare const isFtSearchRequest: (o: any) => o is FtSearchRequest;
|
|
156
|
+
export interface FtSearchResultCluster {
|
|
157
|
+
entries: Array<FtSearchResultClusterEntry>;
|
|
158
|
+
metadataVariableAxis?: string;
|
|
159
|
+
}
|
|
160
|
+
export declare const isFtSearchResultCluster: (o: any) => o is FtSearchResultCluster;
|
|
161
|
+
export interface FtSearchResultClusterEntry {
|
|
162
|
+
document?: FtSearchResultUnstructuredDocument;
|
|
163
|
+
topic?: FtSearchResultTopic;
|
|
164
|
+
type: FtSearchResultType;
|
|
165
|
+
map?: FtSearchResultMap;
|
|
166
|
+
}
|
|
167
|
+
export declare const isFtSearchResultClusterEntry: (o: any) => o is FtSearchResultClusterEntry;
|
|
168
|
+
export interface FtSearchResultUnstructuredDocument {
|
|
169
|
+
metadata: Array<FtMetadata>;
|
|
170
|
+
openMode: FtOpenMode;
|
|
171
|
+
documentUrl: string;
|
|
172
|
+
mimeType: string;
|
|
173
|
+
source: any;
|
|
174
|
+
title: string;
|
|
175
|
+
lastPublicationDate?: string;
|
|
176
|
+
viewerUrl: string;
|
|
177
|
+
contentUrl: string;
|
|
178
|
+
filename: string;
|
|
179
|
+
htmlTitle: string;
|
|
180
|
+
originUrl?: string;
|
|
181
|
+
documentId: string;
|
|
182
|
+
lastEditionDate: string;
|
|
183
|
+
htmlExcerpt: string;
|
|
184
|
+
}
|
|
185
|
+
export declare const isFtSearchResultUnstructuredDocument: (o: any) => o is FtSearchResultUnstructuredDocument;
|
|
186
|
+
export interface FtSearchResultMap {
|
|
187
|
+
metadata: Array<FtMetadata>;
|
|
188
|
+
openMode: FtOpenMode;
|
|
189
|
+
editorialType: FtEditorialType;
|
|
190
|
+
source?: any;
|
|
191
|
+
title: string;
|
|
192
|
+
lastPublicationDate?: string;
|
|
193
|
+
htmlTitle: string;
|
|
194
|
+
originUrl?: string;
|
|
195
|
+
mapUrl: string;
|
|
196
|
+
readerUrl: string;
|
|
197
|
+
mapId: string;
|
|
198
|
+
lastEditionDate?: string;
|
|
199
|
+
htmlExcerpt: string;
|
|
200
|
+
}
|
|
201
|
+
export declare const isFtSearchResultMap: (o: any) => o is FtSearchResultMap;
|
|
202
|
+
export interface FtSearchResultTopic {
|
|
203
|
+
metadata: Array<FtMetadata>;
|
|
204
|
+
openMode: FtOpenMode;
|
|
205
|
+
contentId: string;
|
|
206
|
+
resources: Array<FtTopicResource>;
|
|
207
|
+
source?: any;
|
|
208
|
+
title: string;
|
|
209
|
+
mapTitle: string;
|
|
210
|
+
topicUrl: string;
|
|
211
|
+
contentUrl: string;
|
|
212
|
+
htmlTitle: string;
|
|
213
|
+
breadcrumb: Array<string>;
|
|
214
|
+
tocId: string;
|
|
215
|
+
originUrl?: string;
|
|
216
|
+
readerUrl: string;
|
|
217
|
+
mapId: string;
|
|
218
|
+
lastEditionDate?: string;
|
|
219
|
+
htmlExcerpt: string;
|
|
220
|
+
}
|
|
221
|
+
export declare const isFtSearchResultTopic: (o: any) => o is FtSearchResultTopic;
|
|
103
222
|
export declare enum FtSearchResultType {
|
|
104
223
|
MAP = "MAP",
|
|
105
224
|
DOCUMENT = "DOCUMENT",
|
|
106
225
|
TOPIC = "TOPIC"
|
|
107
226
|
}
|
|
108
227
|
export declare const isFtSearchResultType: (o: any) => o is FtSearchResultType;
|
|
228
|
+
export interface FtSearchFacet {
|
|
229
|
+
hierarchical: boolean;
|
|
230
|
+
label: string;
|
|
231
|
+
multiSelectionable: boolean;
|
|
232
|
+
key: string;
|
|
233
|
+
rootNodes: Array<FtSearchFacetEntry>;
|
|
234
|
+
}
|
|
235
|
+
export declare const isFtSearchFacet: (o: any) => o is FtSearchFacet;
|
|
236
|
+
export interface FtSearchFacetConf {
|
|
237
|
+
maxDepth?: number;
|
|
238
|
+
id: string;
|
|
239
|
+
}
|
|
240
|
+
export declare const isFtSearchFacetConf: (o: any) => o is FtSearchFacetConf;
|
|
241
|
+
export interface FtSearchFacetEntry {
|
|
242
|
+
totalResultsCount: number;
|
|
243
|
+
descendantSelected: boolean;
|
|
244
|
+
childNodes: Array<FtSearchFacetEntry>;
|
|
245
|
+
label: string;
|
|
246
|
+
value: string;
|
|
247
|
+
selected: boolean;
|
|
248
|
+
}
|
|
249
|
+
export declare const isFtSearchFacetEntry: (o: any) => o is FtSearchFacetEntry;
|
|
250
|
+
export interface FtSearchSortCriterion {
|
|
251
|
+
type: any;
|
|
252
|
+
key: string;
|
|
253
|
+
order: any;
|
|
254
|
+
}
|
|
255
|
+
export declare const isFtSearchSortCriterion: (o: any) => o is FtSearchSortCriterion;
|
|
256
|
+
export interface FtSpellcheck {
|
|
257
|
+
suggestedQuery: string;
|
|
258
|
+
htmlSuggestedQuery: string;
|
|
259
|
+
}
|
|
260
|
+
export declare const isFtSpellcheck: (o: any) => o is FtSpellcheck;
|
|
261
|
+
export interface FtTopicResource {
|
|
262
|
+
filename: string;
|
|
263
|
+
resourceUrl: string;
|
|
264
|
+
id: string;
|
|
265
|
+
mimeType: string;
|
|
266
|
+
resourceContentUrl: string;
|
|
267
|
+
viewerUrl: string;
|
|
268
|
+
}
|
|
269
|
+
export declare const isFtTopicResource: (o: any) => o is FtTopicResource;
|
|
270
|
+
export interface FtSuggestRequest {
|
|
271
|
+
input: string;
|
|
272
|
+
filters: Array<FtSearchFilter>;
|
|
273
|
+
sort: Array<FtSearchSortCriterion>;
|
|
274
|
+
maxCount?: number;
|
|
275
|
+
contentLocale?: string;
|
|
276
|
+
}
|
|
277
|
+
export declare const isFtSuggestRequest: (o: any) => o is FtSuggestRequest;
|
|
278
|
+
export interface FtSuggestResult {
|
|
279
|
+
filenameExtension?: string;
|
|
280
|
+
editorialType?: FtEditorialType;
|
|
281
|
+
mimeType?: string;
|
|
282
|
+
type: FtSearchResultType;
|
|
283
|
+
value: string;
|
|
284
|
+
}
|
|
285
|
+
export declare const isFtSuggestResult: (o: any) => o is FtSuggestResult;
|
|
286
|
+
export interface FtSuggestResults {
|
|
287
|
+
suggestions: Array<FtSuggestResult>;
|
|
288
|
+
}
|
|
289
|
+
export declare const isFtSuggestResults: (o: any) => o is FtSuggestResults;
|
|
109
290
|
export interface FtAuthenticationIdentifier {
|
|
110
291
|
identifier: string;
|
|
111
292
|
realm: string;
|
|
@@ -16,7 +16,7 @@ export const isFtCollectionDocument = (o) => {
|
|
|
16
16
|
&& (o.portalUrl == null || isString(o.portalUrl))
|
|
17
17
|
&& (isString(o.id))
|
|
18
18
|
&& (isString(o.title))
|
|
19
|
-
&& (
|
|
19
|
+
&& (isFtCollectionDocumentType(o.type));
|
|
20
20
|
};
|
|
21
21
|
export const isFtMap = (o) => {
|
|
22
22
|
return isObject(o)
|
|
@@ -89,6 +89,17 @@ export var FtTopicContentTarget;
|
|
|
89
89
|
export const isFtTopicContentTarget = (o) => {
|
|
90
90
|
return ["THIRD_PARTY", "OFF_THE_GRID"].includes(o);
|
|
91
91
|
};
|
|
92
|
+
export const isFtSearchLocale = (o) => {
|
|
93
|
+
return isObject(o)
|
|
94
|
+
&& (isNumber(o.count))
|
|
95
|
+
&& (isString(o.label))
|
|
96
|
+
&& (o.lang == null || isString(o.lang));
|
|
97
|
+
};
|
|
98
|
+
export const isFtSearchLocales = (o) => {
|
|
99
|
+
return isObject(o)
|
|
100
|
+
&& ((Array.isArray(o.contentLocales)
|
|
101
|
+
&& o.contentLocales.every((v) => isFtSearchLocale(v))));
|
|
102
|
+
};
|
|
92
103
|
export const isFtMetadata = (o) => {
|
|
93
104
|
return isObject(o)
|
|
94
105
|
&& ((Array.isArray(o.values)
|
|
@@ -103,6 +114,20 @@ export const isFtMapResource = (o) => {
|
|
|
103
114
|
&& (isString(o.id))
|
|
104
115
|
&& (isString(o.mimeType));
|
|
105
116
|
};
|
|
117
|
+
export const isFtSearchFilter = (o) => {
|
|
118
|
+
return isObject(o)
|
|
119
|
+
&& (isBoolean(o.negative))
|
|
120
|
+
&& ((Array.isArray(o.values)
|
|
121
|
+
&& o.values.every((v) => isString(v))))
|
|
122
|
+
&& (isString(o.key));
|
|
123
|
+
};
|
|
124
|
+
export const isFtSearchResultsPageInfo = (o) => {
|
|
125
|
+
return isObject(o)
|
|
126
|
+
&& (isNumber(o.totalResultsCount))
|
|
127
|
+
&& (isBoolean(o.lastPage))
|
|
128
|
+
&& (isNumber(o.currentPage))
|
|
129
|
+
&& (isNumber(o.totalClustersCount));
|
|
130
|
+
};
|
|
106
131
|
// From: WsEditorialType
|
|
107
132
|
export var FtEditorialType;
|
|
108
133
|
(function (FtEditorialType) {
|
|
@@ -121,6 +146,114 @@ export var FtOpenMode;
|
|
|
121
146
|
export const isFtOpenMode = (o) => {
|
|
122
147
|
return ["FLUIDTOPICS", "EXTERNAL"].includes(o);
|
|
123
148
|
};
|
|
149
|
+
export const isFtPageRequest = (o) => {
|
|
150
|
+
return isObject(o)
|
|
151
|
+
&& (o.perPage == null || isNumber(o.perPage))
|
|
152
|
+
&& (isNumber(o.page));
|
|
153
|
+
};
|
|
154
|
+
// From: WsPublicCollectionDocumentType
|
|
155
|
+
export var FtCollectionDocumentType;
|
|
156
|
+
(function (FtCollectionDocumentType) {
|
|
157
|
+
FtCollectionDocumentType["MAP"] = "MAP";
|
|
158
|
+
FtCollectionDocumentType["DOCUMENT"] = "DOCUMENT";
|
|
159
|
+
FtCollectionDocumentType["TOPIC"] = "TOPIC";
|
|
160
|
+
FtCollectionDocumentType["PERSONAL_BOOK"] = "PERSONAL_BOOK";
|
|
161
|
+
FtCollectionDocumentType["SHARED_BOOK"] = "SHARED_BOOK";
|
|
162
|
+
})(FtCollectionDocumentType || (FtCollectionDocumentType = {}));
|
|
163
|
+
export const isFtCollectionDocumentType = (o) => {
|
|
164
|
+
return ["MAP", "DOCUMENT", "TOPIC", "PERSONAL_BOOK", "SHARED_BOOK"].includes(o);
|
|
165
|
+
};
|
|
166
|
+
export const isFtSearchResults = (o) => {
|
|
167
|
+
return isObject(o)
|
|
168
|
+
&& (o.spellcheck == null || isFtSpellcheck(o.spellcheck))
|
|
169
|
+
&& (isFtSearchResultsPageInfo(o.paging))
|
|
170
|
+
&& ((Array.isArray(o.results)
|
|
171
|
+
&& o.results.every((v) => isFtSearchResultCluster(v))))
|
|
172
|
+
&& ((Array.isArray(o.facets)
|
|
173
|
+
&& o.facets.every((v) => isFtSearchFacet(v))));
|
|
174
|
+
};
|
|
175
|
+
export const isFtSearchRequest = (o) => {
|
|
176
|
+
return isObject(o)
|
|
177
|
+
&& (isString(o.query))
|
|
178
|
+
&& (isFtPageRequest(o.paging))
|
|
179
|
+
&& ((Array.isArray(o.filters)
|
|
180
|
+
&& o.filters.every((v) => isFtSearchFilter(v))))
|
|
181
|
+
&& ((Array.isArray(o.sort)
|
|
182
|
+
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
183
|
+
&& (o.uiLocale == null || isString(o.uiLocale))
|
|
184
|
+
&& (o.contentLocale == null || isString(o.contentLocale))
|
|
185
|
+
&& ((Array.isArray(o.facets)
|
|
186
|
+
&& o.facets.every((v) => isFtSearchFacetConf(v))));
|
|
187
|
+
};
|
|
188
|
+
export const isFtSearchResultCluster = (o) => {
|
|
189
|
+
return isObject(o)
|
|
190
|
+
&& ((Array.isArray(o.entries)
|
|
191
|
+
&& o.entries.every((v) => isFtSearchResultClusterEntry(v))))
|
|
192
|
+
&& (o.metadataVariableAxis == null || isString(o.metadataVariableAxis));
|
|
193
|
+
};
|
|
194
|
+
export const isFtSearchResultClusterEntry = (o) => {
|
|
195
|
+
return isObject(o)
|
|
196
|
+
&& (o.document == null || isFtSearchResultUnstructuredDocument(o.document))
|
|
197
|
+
&& (o.topic == null || isFtSearchResultTopic(o.topic))
|
|
198
|
+
&& (isFtSearchResultType(o.type))
|
|
199
|
+
&& (o.map == null || isFtSearchResultMap(o.map));
|
|
200
|
+
};
|
|
201
|
+
export const isFtSearchResultUnstructuredDocument = (o) => {
|
|
202
|
+
return isObject(o)
|
|
203
|
+
&& ((Array.isArray(o.metadata)
|
|
204
|
+
&& o.metadata.every((v) => isFtMetadata(v))))
|
|
205
|
+
&& (isFtOpenMode(o.openMode))
|
|
206
|
+
&& (isString(o.documentUrl))
|
|
207
|
+
&& (isString(o.mimeType))
|
|
208
|
+
&& (isString(o.title))
|
|
209
|
+
&& (o.lastPublicationDate == null || isString(o.lastPublicationDate))
|
|
210
|
+
&& (isString(o.viewerUrl))
|
|
211
|
+
&& (isString(o.contentUrl))
|
|
212
|
+
&& (isString(o.filename))
|
|
213
|
+
&& (isString(o.htmlTitle))
|
|
214
|
+
&& (o.originUrl == null || isString(o.originUrl))
|
|
215
|
+
&& (isString(o.documentId))
|
|
216
|
+
&& (isString(o.lastEditionDate))
|
|
217
|
+
&& (isString(o.htmlExcerpt));
|
|
218
|
+
};
|
|
219
|
+
export const isFtSearchResultMap = (o) => {
|
|
220
|
+
return isObject(o)
|
|
221
|
+
&& ((Array.isArray(o.metadata)
|
|
222
|
+
&& o.metadata.every((v) => isFtMetadata(v))))
|
|
223
|
+
&& (isFtOpenMode(o.openMode))
|
|
224
|
+
&& (isFtEditorialType(o.editorialType))
|
|
225
|
+
&& (isString(o.title))
|
|
226
|
+
&& (o.lastPublicationDate == null || isString(o.lastPublicationDate))
|
|
227
|
+
&& (isString(o.htmlTitle))
|
|
228
|
+
&& (o.originUrl == null || isString(o.originUrl))
|
|
229
|
+
&& (isString(o.mapUrl))
|
|
230
|
+
&& (isString(o.readerUrl))
|
|
231
|
+
&& (isString(o.mapId))
|
|
232
|
+
&& (o.lastEditionDate == null || isString(o.lastEditionDate))
|
|
233
|
+
&& (isString(o.htmlExcerpt));
|
|
234
|
+
};
|
|
235
|
+
export const isFtSearchResultTopic = (o) => {
|
|
236
|
+
return isObject(o)
|
|
237
|
+
&& ((Array.isArray(o.metadata)
|
|
238
|
+
&& o.metadata.every((v) => isFtMetadata(v))))
|
|
239
|
+
&& (isFtOpenMode(o.openMode))
|
|
240
|
+
&& (isString(o.contentId))
|
|
241
|
+
&& ((Array.isArray(o.resources)
|
|
242
|
+
&& o.resources.every((v) => isFtTopicResource(v))))
|
|
243
|
+
&& (isString(o.title))
|
|
244
|
+
&& (isString(o.mapTitle))
|
|
245
|
+
&& (isString(o.topicUrl))
|
|
246
|
+
&& (isString(o.contentUrl))
|
|
247
|
+
&& (isString(o.htmlTitle))
|
|
248
|
+
&& ((Array.isArray(o.breadcrumb)
|
|
249
|
+
&& o.breadcrumb.every((v) => isString(v))))
|
|
250
|
+
&& (isString(o.tocId))
|
|
251
|
+
&& (o.originUrl == null || isString(o.originUrl))
|
|
252
|
+
&& (isString(o.readerUrl))
|
|
253
|
+
&& (isString(o.mapId))
|
|
254
|
+
&& (o.lastEditionDate == null || isString(o.lastEditionDate))
|
|
255
|
+
&& (isString(o.htmlExcerpt));
|
|
256
|
+
};
|
|
124
257
|
// From: WsPublicSearchResultType
|
|
125
258
|
export var FtSearchResultType;
|
|
126
259
|
(function (FtSearchResultType) {
|
|
@@ -131,6 +264,71 @@ export var FtSearchResultType;
|
|
|
131
264
|
export const isFtSearchResultType = (o) => {
|
|
132
265
|
return ["MAP", "DOCUMENT", "TOPIC"].includes(o);
|
|
133
266
|
};
|
|
267
|
+
export const isFtSearchFacet = (o) => {
|
|
268
|
+
return isObject(o)
|
|
269
|
+
&& (isBoolean(o.hierarchical))
|
|
270
|
+
&& (isString(o.label))
|
|
271
|
+
&& (isBoolean(o.multiSelectionable))
|
|
272
|
+
&& (isString(o.key))
|
|
273
|
+
&& ((Array.isArray(o.rootNodes)
|
|
274
|
+
&& o.rootNodes.every((v) => isFtSearchFacetEntry(v))));
|
|
275
|
+
};
|
|
276
|
+
export const isFtSearchFacetConf = (o) => {
|
|
277
|
+
return isObject(o)
|
|
278
|
+
&& (o.maxDepth == null || isNumber(o.maxDepth))
|
|
279
|
+
&& (isString(o.id));
|
|
280
|
+
};
|
|
281
|
+
export const isFtSearchFacetEntry = (o) => {
|
|
282
|
+
return isObject(o)
|
|
283
|
+
&& (isNumber(o.totalResultsCount))
|
|
284
|
+
&& (isBoolean(o.descendantSelected))
|
|
285
|
+
&& ((Array.isArray(o.childNodes)
|
|
286
|
+
&& o.childNodes.every((v) => isFtSearchFacetEntry(v))))
|
|
287
|
+
&& (isString(o.label))
|
|
288
|
+
&& (isString(o.value))
|
|
289
|
+
&& (isBoolean(o.selected));
|
|
290
|
+
};
|
|
291
|
+
export const isFtSearchSortCriterion = (o) => {
|
|
292
|
+
return isObject(o)
|
|
293
|
+
&& (isString(o.key));
|
|
294
|
+
};
|
|
295
|
+
export const isFtSpellcheck = (o) => {
|
|
296
|
+
return isObject(o)
|
|
297
|
+
&& (isString(o.suggestedQuery))
|
|
298
|
+
&& (isString(o.htmlSuggestedQuery));
|
|
299
|
+
};
|
|
300
|
+
export const isFtTopicResource = (o) => {
|
|
301
|
+
return isObject(o)
|
|
302
|
+
&& (isString(o.filename))
|
|
303
|
+
&& (isString(o.resourceUrl))
|
|
304
|
+
&& (isString(o.id))
|
|
305
|
+
&& (isString(o.mimeType))
|
|
306
|
+
&& (isString(o.resourceContentUrl))
|
|
307
|
+
&& (isString(o.viewerUrl));
|
|
308
|
+
};
|
|
309
|
+
export const isFtSuggestRequest = (o) => {
|
|
310
|
+
return isObject(o)
|
|
311
|
+
&& (isString(o.input))
|
|
312
|
+
&& ((Array.isArray(o.filters)
|
|
313
|
+
&& o.filters.every((v) => isFtSearchFilter(v))))
|
|
314
|
+
&& ((Array.isArray(o.sort)
|
|
315
|
+
&& o.sort.every((v) => isFtSearchSortCriterion(v))))
|
|
316
|
+
&& (o.maxCount == null || isNumber(o.maxCount))
|
|
317
|
+
&& (o.contentLocale == null || isString(o.contentLocale));
|
|
318
|
+
};
|
|
319
|
+
export const isFtSuggestResult = (o) => {
|
|
320
|
+
return isObject(o)
|
|
321
|
+
&& (o.filenameExtension == null || isString(o.filenameExtension))
|
|
322
|
+
&& (o.editorialType == null || isFtEditorialType(o.editorialType))
|
|
323
|
+
&& (o.mimeType == null || isString(o.mimeType))
|
|
324
|
+
&& (isFtSearchResultType(o.type))
|
|
325
|
+
&& (isString(o.value));
|
|
326
|
+
};
|
|
327
|
+
export const isFtSuggestResults = (o) => {
|
|
328
|
+
return isObject(o)
|
|
329
|
+
&& ((Array.isArray(o.suggestions)
|
|
330
|
+
&& o.suggestions.every((v) => isFtSuggestResult(v))));
|
|
331
|
+
};
|
|
134
332
|
export const isFtAuthenticationIdentifier = (o) => {
|
|
135
333
|
return isObject(o)
|
|
136
334
|
&& (isString(o.identifier))
|