@fluid-topics/public-api 1.0.48 → 1.0.49

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.
Files changed (36) hide show
  1. package/build/rollup/fluidtopics.min.js +1 -1
  2. package/package.json +1 -1
  3. package/.yarnrc +0 -1
  4. package/build/cjs/index.js +0 -373
  5. package/build/cjs/preferences/unauthenticated-preferences.js +0 -67
  6. package/build/cjs/roles/roles.js +0 -31
  7. package/build/cjs/types/ft-common/public.js +0 -742
  8. package/build/cjs/types/ft-server/public.js +0 -69
  9. package/build/mjs/index.d.ts +0 -168
  10. package/build/mjs/index.js +0 -358
  11. package/build/mjs/preferences/unauthenticated-preferences.d.ts +0 -9
  12. package/build/mjs/preferences/unauthenticated-preferences.js +0 -61
  13. package/build/mjs/roles/roles.d.ts +0 -2
  14. package/build/mjs/roles/roles.js +0 -25
  15. package/build/mjs/types/ft-common/public.d.ts +0 -579
  16. package/build/mjs/types/ft-common/public.js +0 -666
  17. package/build/mjs/types/ft-server/public.d.ts +0 -50
  18. package/build/mjs/types/ft-server/public.js +0 -59
  19. package/dist/cjs/index.js +0 -373
  20. package/dist/cjs/package.json +0 -3
  21. package/dist/cjs/preferences/unauthenticated-preferences.js +0 -67
  22. package/dist/cjs/roles/roles.js +0 -31
  23. package/dist/cjs/types/ft-common/public.js +0 -742
  24. package/dist/cjs/types/ft-server/public.js +0 -69
  25. package/dist/fluidtopics.min.js +0 -1
  26. package/dist/mjs/index.d.ts +0 -168
  27. package/dist/mjs/index.js +0 -358
  28. package/dist/mjs/package.json +0 -3
  29. package/dist/mjs/preferences/unauthenticated-preferences.d.ts +0 -9
  30. package/dist/mjs/preferences/unauthenticated-preferences.js +0 -61
  31. package/dist/mjs/roles/roles.d.ts +0 -2
  32. package/dist/mjs/roles/roles.js +0 -25
  33. package/dist/mjs/types/ft-common/public.d.ts +0 -579
  34. package/dist/mjs/types/ft-common/public.js +0 -666
  35. package/dist/mjs/types/ft-server/public.d.ts +0 -50
  36. package/dist/mjs/types/ft-server/public.js +0 -59
@@ -1,666 +0,0 @@
1
- const isObject = (o) => typeof o === "object" && o != null;
2
- const isBoolean = (o) => typeof o === "boolean";
3
- const isNumber = (o) => typeof o === "number";
4
- const isString = (o) => typeof o === "string";
5
- // From: MyLibraryColors
6
- export var FtMyLibraryColors;
7
- (function (FtMyLibraryColors) {
8
- FtMyLibraryColors["black"] = "black";
9
- FtMyLibraryColors["green"] = "green";
10
- FtMyLibraryColors["blue"] = "blue";
11
- FtMyLibraryColors["purple"] = "purple";
12
- FtMyLibraryColors["red"] = "red";
13
- FtMyLibraryColors["orange"] = "orange";
14
- FtMyLibraryColors["yellow"] = "yellow";
15
- })(FtMyLibraryColors || (FtMyLibraryColors = {}));
16
- export const isFtMyLibraryColors = (o) => {
17
- return ["black", "green", "blue", "purple", "red", "orange", "yellow"].includes(o);
18
- };
19
- // From: SourceType
20
- export var FtTopicOriginType;
21
- (function (FtTopicOriginType) {
22
- FtTopicOriginType["OFFICIAL"] = "OFFICIAL";
23
- FtTopicOriginType["PERSONAL"] = "PERSONAL";
24
- FtTopicOriginType["SHARED"] = "SHARED";
25
- })(FtTopicOriginType || (FtTopicOriginType = {}));
26
- export const isFtTopicOriginType = (o) => {
27
- return ["OFFICIAL", "PERSONAL", "SHARED"].includes(o);
28
- };
29
- export const isFtCredentials = (o) => {
30
- return isObject(o)
31
- && (isString(o.password))
32
- && (o.newPassword == null || isString(o.newPassword))
33
- && (isBoolean(o.rememberMe))
34
- && (isString(o.login));
35
- };
36
- export const isFtPersonalBookCreation = (o) => {
37
- return isObject(o)
38
- && ((Array.isArray(o.metadata)
39
- && o.metadata.every((v) => isFtPersonalBookMetadataUpdate(v))))
40
- && ((Array.isArray(o.nodes)
41
- && o.nodes.every((v) => isFtPersonalBookNodeCreation(v))))
42
- && (isString(o.description))
43
- && (isString(o.title));
44
- };
45
- export const isFtPersonalBookMetadataUpdate = (o) => {
46
- return isObject(o)
47
- && ((Array.isArray(o.values)
48
- && o.values.every((v) => (Array.isArray(v)
49
- && v.every((v) => isString(v))))))
50
- && (isString(o.key));
51
- };
52
- export const isFtPersonalBookNodeCreation = (o) => {
53
- return isObject(o)
54
- && (isString(o.notes))
55
- && ((Array.isArray(o.children)
56
- && o.children.every((v) => isFtPersonalBookNodeCreation(v))))
57
- && (o.topicLink == null || isFtPersonalBookTopicLinkCreation(o.topicLink))
58
- && (isString(o.title))
59
- && (o.htmlContent == null || isString(o.htmlContent));
60
- };
61
- export const isFtPersonalBookTopicLinkCreation = (o) => {
62
- return isObject(o)
63
- && (isString(o.tocId))
64
- && (isString(o.contentId))
65
- && (isString(o.mapId));
66
- };
67
- export const isFtBookmark = (o) => {
68
- return isObject(o)
69
- && (isString(o.mapTitle))
70
- && (isFtMyLibraryColors(o.color))
71
- && ((Array.isArray(o.breadcrumb)
72
- && o.breadcrumb.every((v) => isString(v))))
73
- && (isString(o.tocId))
74
- && (isString(o.lastUpdate))
75
- && (isString(o.readerUrl))
76
- && (isString(o.mapId))
77
- && (isString(o.id))
78
- && (isString(o.title))
79
- && (isString(o.creationDate));
80
- };
81
- export const isFtCollectionDocument = (o) => {
82
- return isObject(o)
83
- && (isBoolean(o.deleted))
84
- && (o.apiUrl == null || isString(o.apiUrl))
85
- && (o.portalUrl == null || isString(o.portalUrl))
86
- && (isString(o.id))
87
- && (isString(o.title))
88
- && (isFtCollectionDocumentType(o.type));
89
- };
90
- export const isFtMap = (o) => {
91
- return isObject(o)
92
- && (o.prettyUrl == null || isString(o.prettyUrl))
93
- && ((Array.isArray(o.metadata)
94
- && o.metadata.every((v) => isFtMetadata(v))))
95
- && (isFtOpenMode(o.openMode))
96
- && (o.topicsApiEndpoint == null || isString(o.topicsApiEndpoint))
97
- && (o.description == null || isString(o.description))
98
- && (o.attachmentsApiEndpoint == null || isString(o.attachmentsApiEndpoint))
99
- && (isFtEditorialType(o.editorialType))
100
- && (isString(o.baseId))
101
- && (isString(o.clusterId))
102
- && (isString(o.title))
103
- && (isString(o.lastPublication))
104
- && (isString(o.lastEdition))
105
- && (isString(o.originId))
106
- && (o.rightsApiEndpoint == null || isString(o.rightsApiEndpoint))
107
- && (isFtMapStyles(o.contentStyles))
108
- && (o.originUrl == null || isString(o.originUrl))
109
- && (isString(o.readerUrl))
110
- && (o.khubVersion == null || isString(o.khubVersion))
111
- && (isString(o.id))
112
- && (o.lang == null || isString(o.lang));
113
- };
114
- export const isFtMapStyles = (o) => {
115
- return isObject(o)
116
- && (isString(o.topicStylesheetUrl))
117
- && (isString(o.titleStylesheetUrl))
118
- && ((Array.isArray(o.customCssClasses)
119
- && o.customCssClasses.every((v) => isString(v))));
120
- };
121
- export const isFtTocNode = (o) => {
122
- return isObject(o)
123
- && (o.prettyUrl == null || isString(o.prettyUrl))
124
- && (o.hasRating == null || isBoolean(o.hasRating))
125
- && (isString(o.tocId))
126
- && ((Array.isArray(o.children)
127
- && o.children.every((v) => isFtTocNode(v))))
128
- && (o.origin == null || isFtTopicOrigin(o.origin))
129
- && (isString(o.contentId))
130
- && (isString(o.title));
131
- };
132
- export const isFtTopic = (o) => {
133
- return isObject(o)
134
- && ((Array.isArray(o.metadata)
135
- && o.metadata.every((v) => isFtMetadata(v))))
136
- && (isString(o.id))
137
- && (isString(o.contentApiEndpoint))
138
- && (isString(o.title));
139
- };
140
- export const isFtTopicOrigin = (o) => {
141
- return isObject(o)
142
- && (isString(o.mapTitle))
143
- && ((Array.isArray(o.breadcrumb)
144
- && o.breadcrumb.every((v) => isString(v))))
145
- && (isString(o.tocId))
146
- && (isString(o.contentId))
147
- && (isString(o.mapId))
148
- && (isFtTopicOriginType(o.type));
149
- };
150
- export const isFtUnstructuredDocument = (o) => {
151
- return isObject(o)
152
- && (o.prettyUrl == null || isString(o.prettyUrl))
153
- && ((Array.isArray(o.metadata)
154
- && o.metadata.every((v) => isFtMetadata(v))))
155
- && (isString(o.openMode))
156
- && (o.description == null || isString(o.description))
157
- && (isString(o.mimeType))
158
- && (o.baseId == null || isString(o.baseId))
159
- && (o.clusterId == null || isString(o.clusterId))
160
- && (isString(o.contentApiEndpoint))
161
- && (isString(o.title))
162
- && (o.lastPublication == null || isString(o.lastPublication))
163
- && (isString(o.viewerUrl))
164
- && (isString(o.lastEdition))
165
- && (isString(o.filename))
166
- && (o.originId == null || isString(o.originId))
167
- && (isString(o.rightsApiEndpoint))
168
- && (o.originUrl == null || isString(o.originUrl))
169
- && (o.khubVersion == null || isString(o.khubVersion))
170
- && (isString(o.id))
171
- && (o.lang == null || isString(o.lang));
172
- };
173
- // From: WsTopicContentTarget
174
- export var FtTopicContentTarget;
175
- (function (FtTopicContentTarget) {
176
- FtTopicContentTarget["THIRD_PARTY"] = "THIRD_PARTY";
177
- FtTopicContentTarget["OFF_THE_GRID"] = "OFF_THE_GRID";
178
- FtTopicContentTarget["CONTENT_PACKAGER"] = "CONTENT_PACKAGER";
179
- FtTopicContentTarget["PAGES"] = "PAGES";
180
- FtTopicContentTarget["DESIGNED_READER"] = "DESIGNED_READER";
181
- })(FtTopicContentTarget || (FtTopicContentTarget = {}));
182
- export const isFtTopicContentTarget = (o) => {
183
- return ["THIRD_PARTY", "OFF_THE_GRID", "CONTENT_PACKAGER", "PAGES", "DESIGNED_READER"].includes(o);
184
- };
185
- export const isFtFeedbackCreation = (o) => {
186
- return isObject(o)
187
- && (o.from == null || isString(o.from))
188
- && (isString(o.message));
189
- };
190
- export const isFtSearchLocale = (o) => {
191
- return isObject(o)
192
- && (isNumber(o.count))
193
- && (isString(o.label))
194
- && (o.lang == null || isString(o.lang));
195
- };
196
- export const isFtSearchLocales = (o) => {
197
- return isObject(o)
198
- && ((Array.isArray(o.contentLocales)
199
- && o.contentLocales.every((v) => isFtSearchLocale(v))));
200
- };
201
- export const isFtMessageContext = (o) => {
202
- return isObject(o)
203
- && (isString(o.name))
204
- && ((isObject(o.messages)
205
- && Object.keys(o.messages).every((k) => isString(k))
206
- && Object.values(o.messages).every((v) => isString(v))))
207
- && (isString(o.locale));
208
- };
209
- export const isFtUiLocale = (o) => {
210
- return isObject(o)
211
- && (isString(o.displayName))
212
- && (isString(o.languageTag))
213
- && (isBoolean(o.translated));
214
- };
215
- export const isFtMetadata = (o) => {
216
- return isObject(o)
217
- && ((Array.isArray(o.values)
218
- && o.values.every((v) => isString(v))))
219
- && (o.hierarchicalValues == null || (Array.isArray(o.hierarchicalValues)
220
- && o.hierarchicalValues.every((v) => (Array.isArray(v)
221
- && v.every((v) => isString(v))))))
222
- && (isString(o.label))
223
- && (isString(o.key));
224
- };
225
- export const isFtMySearch = (o) => {
226
- return isObject(o)
227
- && (isFtMySearchRequest(o.searchRequest))
228
- && (isFtMyLibraryColors(o.color))
229
- && (isBoolean(o.alert))
230
- && (isString(o.description))
231
- && (isString(o.id))
232
- && (isString(o.ownerId))
233
- && (isString(o.title))
234
- && (isString(o.creationDate));
235
- };
236
- export const isFtMySearchRequest = (o) => {
237
- return isObject(o)
238
- && (o.periodFilter == null || isFtPeriodFilter(o.periodFilter))
239
- && (isString(o.query))
240
- && (o.scope == null || isFtSearchScope(o.scope))
241
- && ((Array.isArray(o.filters)
242
- && o.filters.every((v) => isFtLabeledSearchFilter(v))))
243
- && ((Array.isArray(o.sort)
244
- && o.sort.every((v) => isFtSearchSortCriterion(v))))
245
- && (o.virtualField == null || isFtVirtualField(o.virtualField))
246
- && (o.contentLocale == null || isString(o.contentLocale));
247
- };
248
- // From: RatingType
249
- export var FtRatingType;
250
- (function (FtRatingType) {
251
- FtRatingType["STARS"] = "STARS";
252
- FtRatingType["LIKE"] = "LIKE";
253
- FtRatingType["DICHOTOMOUS"] = "DICHOTOMOUS";
254
- FtRatingType["NO_RATING"] = "NO_RATING";
255
- })(FtRatingType || (FtRatingType = {}));
256
- export const isFtRatingType = (o) => {
257
- return ["STARS", "LIKE", "DICHOTOMOUS", "NO_RATING"].includes(o);
258
- };
259
- export const isFtPublicationRating = (o) => {
260
- return isObject(o)
261
- && (isString(o.date))
262
- && (isFtRatingType(o.type))
263
- && (isNumber(o.value));
264
- };
265
- export const isFtPublicationRatingSummary = (o) => {
266
- return isObject(o)
267
- && (o.rating == null || isFtPublicationRating(o.rating))
268
- && (isFtRatingType(o.type));
269
- };
270
- export const isFtRatingCreation = (o) => {
271
- return isObject(o)
272
- && (isFtRatingType(o.type))
273
- && (isNumber(o.value));
274
- };
275
- export const isFtRatingSummary = (o) => {
276
- return isObject(o)
277
- && (o.topics == null || isFtTopicsRatingSummary(o.topics))
278
- && (isFtPublicationRatingSummary(o.publication));
279
- };
280
- export const isFtTopicRating = (o) => {
281
- return isObject(o)
282
- && (isString(o.date))
283
- && (isString(o.tocId))
284
- && (isFtRatingType(o.type))
285
- && (isNumber(o.value));
286
- };
287
- export const isFtTopicsRatingSummary = (o) => {
288
- return isObject(o)
289
- && ((Array.isArray(o.ratings)
290
- && o.ratings.every((v) => isFtTopicRating(v))))
291
- && (isFtRatingType(o.type));
292
- };
293
- export const isFtMapResource = (o) => {
294
- return isObject(o)
295
- && (isString(o.contentUrl))
296
- && (isString(o.filename))
297
- && (isString(o.id))
298
- && (isString(o.mimeType));
299
- };
300
- export const isFtMetadataPreferenceConfiguration = (o) => {
301
- return isObject(o)
302
- && ((Array.isArray(o.filter)
303
- && o.filter.every((v) => isString(v))))
304
- && ((Array.isArray(o.prior)
305
- && o.prior.every((v) => isString(v))));
306
- };
307
- export const isFtSearchPreferencesConfiguration = (o) => {
308
- return isObject(o)
309
- && ((isObject(o.metadata)
310
- && Object.keys(o.metadata).every((k) => isString(k))
311
- && Object.values(o.metadata).every((v) => isFtMetadataPreferenceConfiguration(v))));
312
- };
313
- export const isFtPeriod = (o) => {
314
- return isObject(o)
315
- && (isString(o.from))
316
- && (isString(o.to));
317
- };
318
- export const isFtPeriodFilter = (o) => {
319
- return isObject(o)
320
- && (o.period == null || isFtPeriod(o.period))
321
- && (isFtPeriodFilterType(o.periodType));
322
- };
323
- // From: PeriodFilterType
324
- export var FtPeriodFilterType;
325
- (function (FtPeriodFilterType) {
326
- FtPeriodFilterType["LAST_WEEK"] = "LAST_WEEK";
327
- FtPeriodFilterType["LAST_MONTH"] = "LAST_MONTH";
328
- FtPeriodFilterType["LAST_YEAR"] = "LAST_YEAR";
329
- FtPeriodFilterType["CUSTOM"] = "CUSTOM";
330
- })(FtPeriodFilterType || (FtPeriodFilterType = {}));
331
- export const isFtPeriodFilterType = (o) => {
332
- return ["LAST_WEEK", "LAST_MONTH", "LAST_YEAR", "CUSTOM"].includes(o);
333
- };
334
- export const isFtSearchFilter = (o) => {
335
- return isObject(o)
336
- && (isBoolean(o.negative))
337
- && ((Array.isArray(o.values)
338
- && o.values.every((v) => isString(v))))
339
- && (isString(o.key));
340
- };
341
- export const isFtSearchPreset = (o) => {
342
- return isObject(o)
343
- && (isString(o.name))
344
- && ((Array.isArray(o.filters)
345
- && o.filters.every((v) => isFtSearchFilter(v))))
346
- && (isNumber(o.priority))
347
- && (o.contentLocale == null || isString(o.contentLocale));
348
- };
349
- // From: SearchSortCriterionOrder
350
- export var FtSearchSortCriterionOrder;
351
- (function (FtSearchSortCriterionOrder) {
352
- FtSearchSortCriterionOrder["ASC"] = "ASC";
353
- FtSearchSortCriterionOrder["DESC"] = "DESC";
354
- })(FtSearchSortCriterionOrder || (FtSearchSortCriterionOrder = {}));
355
- export const isFtSearchSortCriterionOrder = (o) => {
356
- return ["ASC", "DESC"].includes(o);
357
- };
358
- // From: SearchSortCriterionType
359
- export var FtSearchSortCriterionType;
360
- (function (FtSearchSortCriterionType) {
361
- FtSearchSortCriterionType["ALPHA"] = "ALPHA";
362
- FtSearchSortCriterionType["NATURAL"] = "NATURAL";
363
- })(FtSearchSortCriterionType || (FtSearchSortCriterionType = {}));
364
- export const isFtSearchSortCriterionType = (o) => {
365
- return ["ALPHA", "NATURAL"].includes(o);
366
- };
367
- // From: VirtualField
368
- export var FtVirtualField;
369
- (function (FtVirtualField) {
370
- FtVirtualField["EVERYWHERE"] = "EVERYWHERE";
371
- FtVirtualField["TITLE_ONLY"] = "TITLE_ONLY";
372
- FtVirtualField["NONE"] = "NONE";
373
- })(FtVirtualField || (FtVirtualField = {}));
374
- export const isFtVirtualField = (o) => {
375
- return ["EVERYWHERE", "TITLE_ONLY", "NONE"].includes(o);
376
- };
377
- export const isFtSearchResultsPageInfo = (o) => {
378
- return isObject(o)
379
- && (isNumber(o.totalResultsCount))
380
- && (isBoolean(o.isLastPage))
381
- && (isNumber(o.currentPage))
382
- && (isNumber(o.totalClustersCount));
383
- };
384
- // From: WsEditorialType
385
- export var FtEditorialType;
386
- (function (FtEditorialType) {
387
- FtEditorialType["ARTICLE"] = "ARTICLE";
388
- FtEditorialType["BOOK"] = "BOOK";
389
- FtEditorialType["SHARED_BOOK"] = "SHARED_BOOK";
390
- })(FtEditorialType || (FtEditorialType = {}));
391
- export const isFtEditorialType = (o) => {
392
- return ["ARTICLE", "BOOK", "SHARED_BOOK"].includes(o);
393
- };
394
- // From: WsOpenMode
395
- export var FtOpenMode;
396
- (function (FtOpenMode) {
397
- FtOpenMode["FLUIDTOPICS"] = "FLUIDTOPICS";
398
- FtOpenMode["EXTERNAL"] = "EXTERNAL";
399
- })(FtOpenMode || (FtOpenMode = {}));
400
- export const isFtOpenMode = (o) => {
401
- return ["FLUIDTOPICS", "EXTERNAL"].includes(o);
402
- };
403
- export const isFtPageRequest = (o) => {
404
- return isObject(o)
405
- && (o.perPage == null || isNumber(o.perPage))
406
- && (isNumber(o.page));
407
- };
408
- // From: WsPublicCollectionDocumentType
409
- export var FtCollectionDocumentType;
410
- (function (FtCollectionDocumentType) {
411
- FtCollectionDocumentType["MAP"] = "MAP";
412
- FtCollectionDocumentType["DOCUMENT"] = "DOCUMENT";
413
- FtCollectionDocumentType["TOPIC"] = "TOPIC";
414
- FtCollectionDocumentType["PERSONAL_BOOK"] = "PERSONAL_BOOK";
415
- FtCollectionDocumentType["SHARED_BOOK"] = "SHARED_BOOK";
416
- })(FtCollectionDocumentType || (FtCollectionDocumentType = {}));
417
- export const isFtCollectionDocumentType = (o) => {
418
- return ["MAP", "DOCUMENT", "TOPIC", "PERSONAL_BOOK", "SHARED_BOOK"].includes(o);
419
- };
420
- export const isFtSearchResults = (o) => {
421
- return isObject(o)
422
- && (o.spellcheck == null || isFtSpellcheck(o.spellcheck))
423
- && (isFtSearchResultsPageInfo(o.paging))
424
- && ((Array.isArray(o.results)
425
- && o.results.every((v) => isFtSearchResultCluster(v))))
426
- && ((Array.isArray(o.facets)
427
- && o.facets.every((v) => isFtSearchFacet(v))));
428
- };
429
- export const isFtLabeledSearchFilter = (o) => {
430
- return isObject(o)
431
- && (isBoolean(o.negative))
432
- && ((Array.isArray(o.values)
433
- && o.values.every((v) => isString(v))))
434
- && (isString(o.label))
435
- && (isString(o.key));
436
- };
437
- export const isFtSearchPrior = (o) => {
438
- return isObject(o)
439
- && (isNumber(o.weight))
440
- && (isString(o.value))
441
- && (isString(o.key));
442
- };
443
- export const isFtSearchRequest = (o) => {
444
- return isObject(o)
445
- && (o.periodFilter == null || isFtPeriodFilter(o.periodFilter))
446
- && (isString(o.query))
447
- && (o.scope == null || isFtSearchScope(o.scope))
448
- && (isFtPageRequest(o.paging))
449
- && ((Array.isArray(o.filters)
450
- && o.filters.every((v) => isFtSearchFilter(v))))
451
- && ((Array.isArray(o.sort)
452
- && o.sort.every((v) => isFtSearchSortCriterion(v))))
453
- && (o.uiLocale == null || isString(o.uiLocale))
454
- && (o.virtualField == null || isFtVirtualField(o.virtualField))
455
- && (o.contentLocale == null || isString(o.contentLocale))
456
- && (o.priors == null || (Array.isArray(o.priors)
457
- && o.priors.every((v) => isFtSearchPrior(v))))
458
- && ((Array.isArray(o.facets)
459
- && o.facets.every((v) => isFtSearchFacetConf(v))));
460
- };
461
- export const isFtSearchResultCluster = (o) => {
462
- return isObject(o)
463
- && ((Array.isArray(o.entries)
464
- && o.entries.every((v) => isFtSearchResultClusterEntry(v))))
465
- && (o.metadataVariableAxis == null || isString(o.metadataVariableAxis));
466
- };
467
- export const isFtSearchResultClusterEntry = (o) => {
468
- return isObject(o)
469
- && (o.document == null || isFtSearchResultUnstructuredDocument(o.document))
470
- && (o.topic == null || isFtSearchResultTopic(o.topic))
471
- && (isFtSearchResultType(o.type))
472
- && (o.map == null || isFtSearchResultMap(o.map));
473
- };
474
- export const isFtSearchResultUnstructuredDocument = (o) => {
475
- return isObject(o)
476
- && ((Array.isArray(o.metadata)
477
- && o.metadata.every((v) => isFtMetadata(v))))
478
- && (isFtOpenMode(o.openMode))
479
- && (isString(o.documentUrl))
480
- && (isString(o.mimeType))
481
- && (isString(o.title))
482
- && (o.lastPublicationDate == null || isString(o.lastPublicationDate))
483
- && (isString(o.viewerUrl))
484
- && (isString(o.contentUrl))
485
- && (isString(o.filename))
486
- && (isString(o.htmlTitle))
487
- && (o.originUrl == null || isString(o.originUrl))
488
- && (isString(o.documentId))
489
- && (isString(o.lastEditionDate))
490
- && (isString(o.htmlExcerpt));
491
- };
492
- export const isFtSearchResultMap = (o) => {
493
- return isObject(o)
494
- && ((Array.isArray(o.metadata)
495
- && o.metadata.every((v) => isFtMetadata(v))))
496
- && (o.openMode == null || isFtOpenMode(o.openMode))
497
- && (isFtEditorialType(o.editorialType))
498
- && (isString(o.title))
499
- && (o.lastPublicationDate == null || isString(o.lastPublicationDate))
500
- && (isString(o.htmlTitle))
501
- && (o.originUrl == null || isString(o.originUrl))
502
- && (isString(o.mapUrl))
503
- && (isString(o.readerUrl))
504
- && (isString(o.mapId))
505
- && (o.lastEditionDate == null || isString(o.lastEditionDate))
506
- && (isString(o.htmlExcerpt));
507
- };
508
- export const isFtSearchResultTopic = (o) => {
509
- return isObject(o)
510
- && ((Array.isArray(o.metadata)
511
- && o.metadata.every((v) => isFtMetadata(v))))
512
- && (isFtOpenMode(o.openMode))
513
- && (isString(o.contentId))
514
- && ((Array.isArray(o.resources)
515
- && o.resources.every((v) => isFtTopicResource(v))))
516
- && (isString(o.title))
517
- && (isString(o.mapTitle))
518
- && (isString(o.topicUrl))
519
- && (isString(o.contentUrl))
520
- && (isString(o.htmlTitle))
521
- && ((Array.isArray(o.breadcrumb)
522
- && o.breadcrumb.every((v) => isString(v))))
523
- && (isString(o.tocId))
524
- && (o.originUrl == null || isString(o.originUrl))
525
- && (isString(o.readerUrl))
526
- && (isString(o.mapId))
527
- && (o.lastEditionDate == null || isString(o.lastEditionDate))
528
- && (isString(o.htmlExcerpt));
529
- };
530
- // From: WsPublicSearchResultType
531
- export var FtSearchResultType;
532
- (function (FtSearchResultType) {
533
- FtSearchResultType["MAP"] = "MAP";
534
- FtSearchResultType["DOCUMENT"] = "DOCUMENT";
535
- FtSearchResultType["TOPIC"] = "TOPIC";
536
- })(FtSearchResultType || (FtSearchResultType = {}));
537
- export const isFtSearchResultType = (o) => {
538
- return ["MAP", "DOCUMENT", "TOPIC"].includes(o);
539
- };
540
- // From: WsPublicSearchScope
541
- export var FtSearchScope;
542
- (function (FtSearchScope) {
543
- FtSearchScope["DEFAULT"] = "DEFAULT";
544
- FtSearchScope["DOCUMENTS"] = "DOCUMENTS";
545
- })(FtSearchScope || (FtSearchScope = {}));
546
- export const isFtSearchScope = (o) => {
547
- return ["DEFAULT", "DOCUMENTS"].includes(o);
548
- };
549
- export const isFtSearchFacet = (o) => {
550
- return isObject(o)
551
- && (isBoolean(o.hierarchical))
552
- && (isString(o.label))
553
- && (isBoolean(o.multiSelectionable))
554
- && (isString(o.key))
555
- && ((Array.isArray(o.rootNodes)
556
- && o.rootNodes.every((v) => isFtSearchFacetEntry(v))));
557
- };
558
- export const isFtSearchFacetConf = (o) => {
559
- return isObject(o)
560
- && (o.maxDepth == null || isNumber(o.maxDepth))
561
- && (isString(o.id));
562
- };
563
- export const isFtSearchFacetEntry = (o) => {
564
- return isObject(o)
565
- && (isNumber(o.totalResultsCount))
566
- && (isBoolean(o.descendantSelected))
567
- && ((Array.isArray(o.childNodes)
568
- && o.childNodes.every((v) => isFtSearchFacetEntry(v))))
569
- && (isString(o.label))
570
- && (isString(o.value))
571
- && (isBoolean(o.selected));
572
- };
573
- export const isFtSearchSortCriterion = (o) => {
574
- return isObject(o)
575
- && (isFtSearchSortCriterionType(o.type))
576
- && (isString(o.key))
577
- && (isFtSearchSortCriterionOrder(o.order));
578
- };
579
- export const isFtSpellcheck = (o) => {
580
- return isObject(o)
581
- && (isString(o.suggestedQuery))
582
- && (isString(o.htmlSuggestedQuery));
583
- };
584
- export const isFtTopicResource = (o) => {
585
- return isObject(o)
586
- && (isString(o.filename))
587
- && (isString(o.resourceUrl))
588
- && (isString(o.id))
589
- && (isString(o.mimeType))
590
- && (isString(o.resourceContentUrl))
591
- && (isString(o.viewerUrl));
592
- };
593
- export const isFtSuggestRequest = (o) => {
594
- return isObject(o)
595
- && (isString(o.input))
596
- && ((Array.isArray(o.filters)
597
- && o.filters.every((v) => isFtSearchFilter(v))))
598
- && ((Array.isArray(o.sort)
599
- && o.sort.every((v) => isFtSearchSortCriterion(v))))
600
- && (o.maxCount == null || isNumber(o.maxCount))
601
- && (o.contentLocale == null || isString(o.contentLocale));
602
- };
603
- export const isFtSuggestResult = (o) => {
604
- return isObject(o)
605
- && (o.filenameExtension == null || isString(o.filenameExtension))
606
- && (o.editorialType == null || isFtEditorialType(o.editorialType))
607
- && (o.mimeType == null || isString(o.mimeType))
608
- && (isFtSearchResultType(o.type))
609
- && (isString(o.value));
610
- };
611
- export const isFtSuggestResults = (o) => {
612
- return isObject(o)
613
- && ((Array.isArray(o.suggestions)
614
- && o.suggestions.every((v) => isFtSuggestResult(v))));
615
- };
616
- // From: Role
617
- export var FtUserRole;
618
- (function (FtUserRole) {
619
- FtUserRole["PERSONAL_BOOK_USER"] = "PERSONAL_BOOK_USER";
620
- FtUserRole["PERSONAL_BOOK_SHARE_USER"] = "PERSONAL_BOOK_SHARE_USER";
621
- FtUserRole["HTML_EXPORT_USER"] = "HTML_EXPORT_USER";
622
- FtUserRole["PDF_EXPORT_USER"] = "PDF_EXPORT_USER";
623
- FtUserRole["SAVED_SEARCH_USER"] = "SAVED_SEARCH_USER";
624
- FtUserRole["COLLECTION_USER"] = "COLLECTION_USER";
625
- FtUserRole["OFFLINE_USER"] = "OFFLINE_USER";
626
- FtUserRole["ANALYTICS_USER"] = "ANALYTICS_USER";
627
- FtUserRole["BETA_USER"] = "BETA_USER";
628
- FtUserRole["DEBUG_USER"] = "DEBUG_USER";
629
- FtUserRole["PRINT_USER"] = "PRINT_USER";
630
- FtUserRole["RATING_USER"] = "RATING_USER";
631
- FtUserRole["FEEDBACK_USER"] = "FEEDBACK_USER";
632
- FtUserRole["CONTENT_PUBLISHER"] = "CONTENT_PUBLISHER";
633
- FtUserRole["KHUB_ADMIN"] = "KHUB_ADMIN";
634
- FtUserRole["USERS_ADMIN"] = "USERS_ADMIN";
635
- FtUserRole["PORTAL_ADMIN"] = "PORTAL_ADMIN";
636
- FtUserRole["ADMIN"] = "ADMIN";
637
- FtUserRole["DEVELOPER"] = "DEVELOPER";
638
- })(FtUserRole || (FtUserRole = {}));
639
- export const isFtUserRole = (o) => {
640
- return ["PERSONAL_BOOK_USER", "PERSONAL_BOOK_SHARE_USER", "HTML_EXPORT_USER", "PDF_EXPORT_USER", "SAVED_SEARCH_USER", "COLLECTION_USER", "OFFLINE_USER", "ANALYTICS_USER", "BETA_USER", "DEBUG_USER", "PRINT_USER", "RATING_USER", "FEEDBACK_USER", "CONTENT_PUBLISHER", "KHUB_ADMIN", "USERS_ADMIN", "PORTAL_ADMIN", "ADMIN", "DEVELOPER"].includes(o);
641
- };
642
- export const isFtAuthenticationIdentifier = (o) => {
643
- return isObject(o)
644
- && (isString(o.identifier))
645
- && (isString(o.realm));
646
- };
647
- export const isFtAuthenticatedSession = (o) => {
648
- return isObject(o)
649
- && (isFtAuthenticationIdentifier(o.authenticationIdentifier))
650
- && (isFtUserProfile(o.profile));
651
- };
652
- export const isFtSession = (o) => {
653
- return isObject(o)
654
- && (o.authenticationIdentifier == null || isFtAuthenticationIdentifier(o.authenticationIdentifier))
655
- && (isNumber(o.idleTimeoutInMillis))
656
- && (isFtUserProfile(o.profile))
657
- && (isBoolean(o.sessionAuthenticated));
658
- };
659
- export const isFtUserProfile = (o) => {
660
- return isObject(o)
661
- && (o.emailAddress == null || isString(o.emailAddress))
662
- && (o.displayName == null || isString(o.displayName))
663
- && ((Array.isArray(o.roles)
664
- && o.roles.every((v) => isFtUserRole(v))))
665
- && (o.userId == null || isString(o.userId));
666
- };