@fluid-topics/public-api 1.0.39 → 1.0.41

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