@fluid-topics/public-api 1.0.84-alpha → 1.0.86-alpha1

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.
@@ -21,9 +21,7 @@ export var FtMyLibraryColors;
21
21
  FtMyLibraryColors["orange"] = "orange";
22
22
  FtMyLibraryColors["yellow"] = "yellow";
23
23
  })(FtMyLibraryColors || (FtMyLibraryColors = {}));
24
- export const isFtMyLibraryColors = (o) => {
25
- return ["black", "green", "blue", "purple", "red", "orange", "yellow"].includes(o);
26
- };
24
+ export const isFtMyLibraryColors = (o) => Object.keys(FtMyLibraryColors).includes(o);
27
25
  // From: SourceType
28
26
  export var FtTopicOriginType;
29
27
  (function (FtTopicOriginType) {
@@ -31,8 +29,278 @@ export var FtTopicOriginType;
31
29
  FtTopicOriginType["PERSONAL"] = "PERSONAL";
32
30
  FtTopicOriginType["SHARED"] = "SHARED";
33
31
  })(FtTopicOriginType || (FtTopicOriginType = {}));
34
- export const isFtTopicOriginType = (o) => {
35
- return ["OFFICIAL", "PERSONAL", "SHARED"].includes(o);
32
+ export const isFtTopicOriginType = (o) => Object.keys(FtTopicOriginType).includes(o);
33
+ export const isFtAnalyticsEventDisplay = (o) => {
34
+ return isObject(o)
35
+ && (isNumber(o.width))
36
+ && (isNumber(o.height));
37
+ };
38
+ export const isFtAnalyticsEventGenAIProfile = (o) => {
39
+ return isObject(o)
40
+ && (o.customPrompt == null || isString(o.customPrompt))
41
+ && (isString(o.name))
42
+ && (isString(o.id));
43
+ };
44
+ export const isFtAnalyticsEventLocation = (o) => {
45
+ return isObject(o)
46
+ && (isString(o.type))
47
+ && (isString(o.value));
48
+ };
49
+ export const isFtAnalyticsEventOrigin = (o) => {
50
+ return isObject(o)
51
+ && (isString(o.pageType))
52
+ && (isString(o.type))
53
+ && (isString(o.url));
54
+ };
55
+ export const isFtAnalyticsEventPage = (o) => {
56
+ return isObject(o)
57
+ && (isString(o.name))
58
+ && (o.language == null || isString(o.language))
59
+ && (isString(o.id))
60
+ && (isString(o.type))
61
+ && (isString(o.url));
62
+ };
63
+ export const isFtAnalyticsEventPublication = (o) => {
64
+ return isObject(o)
65
+ && (o.metadata == null || (Array.isArray(o.metadata)
66
+ && o.metadata.every((v) => isFtMetadata(v))))
67
+ && (isString(o.id))
68
+ && (o.mimeType == null || isString(o.mimeType))
69
+ && (o.title == null || isString(o.title))
70
+ && (o.type == null || isFtAnalyticsPublicationType(o.type))
71
+ && (o.parentId == null || isString(o.parentId));
72
+ };
73
+ export const isFtAnalyticsEventRating = (o) => {
74
+ return isObject(o)
75
+ && (isString(o.type))
76
+ && (o.value == null || isString(o.value));
77
+ };
78
+ export const isFtAnalyticsEventSearchQuery = (o) => {
79
+ return isObject(o)
80
+ && (isString(o.terms))
81
+ && (o.searchType == null || isString(o.searchType))
82
+ && (o.lastUpdate == null || isString(o.lastUpdate))
83
+ && (o.facets == null || (Array.isArray(o.facets)
84
+ && o.facets.every((v) => isFtAnalyticsSearchFacet(v))));
85
+ };
86
+ export const isFtAnalyticsEventSearchResponse = (o) => {
87
+ return isObject(o)
88
+ && (o.autocorrect == null || isBoolean(o.autocorrect))
89
+ && (isNumber(o.nbResults));
90
+ };
91
+ export const isFtAnalyticsEventSearchResult = (o) => {
92
+ return isObject(o)
93
+ && (isFtAnalyticsEventPublication(o.document))
94
+ && (isNumber(o.rank))
95
+ && (o.topic == null || isFtAnalyticsEventTopic(o.topic))
96
+ && (isString(o.type));
97
+ };
98
+ export const isFtAnalyticsEventTopic = (o) => {
99
+ return isObject(o)
100
+ && (o.mapTitle == null || isString(o.mapTitle))
101
+ && (o.metadata == null || (Array.isArray(o.metadata)
102
+ && o.metadata.every((v) => isFtMetadata(v))))
103
+ && (isString(o.tocId))
104
+ && (o.mapId == null || isString(o.mapId))
105
+ && (isString(o.title));
106
+ };
107
+ // From: AnalyticsPublicationType
108
+ export var FtAnalyticsPublicationType;
109
+ (function (FtAnalyticsPublicationType) {
110
+ FtAnalyticsPublicationType["STRUCTURED_DOCUMENT"] = "STRUCTURED_DOCUMENT";
111
+ FtAnalyticsPublicationType["UNSTRUCTURED_DOCUMENT"] = "UNSTRUCTURED_DOCUMENT";
112
+ FtAnalyticsPublicationType["SHARED_PERSONAL_BOOK"] = "SHARED_PERSONAL_BOOK";
113
+ FtAnalyticsPublicationType["PERSONAL_BOOK"] = "PERSONAL_BOOK";
114
+ FtAnalyticsPublicationType["MAP_ATTACHMENT"] = "MAP_ATTACHMENT";
115
+ FtAnalyticsPublicationType["RESOURCE"] = "RESOURCE";
116
+ })(FtAnalyticsPublicationType || (FtAnalyticsPublicationType = {}));
117
+ export const isFtAnalyticsPublicationType = (o) => Object.keys(FtAnalyticsPublicationType).includes(o);
118
+ export const isFtAnalyticsSearchFacet = (o) => {
119
+ return isObject(o)
120
+ && (o.dateValue == null || isFtAnalyticsSearchDateFacetValue(o.dateValue))
121
+ && (o.values == null || (Array.isArray(o.values)
122
+ && o.values.every((v) => isString(v))))
123
+ && (o.from == null || isString(o.from))
124
+ && (o.to == null || isString(o.to))
125
+ && (o.type == null || isFtAnalyticsSearchFacetType(o.type))
126
+ && (isString(o.key));
127
+ };
128
+ // From: AnalyticsSearchDateFacetValue
129
+ export var FtAnalyticsSearchDateFacetValue;
130
+ (function (FtAnalyticsSearchDateFacetValue) {
131
+ FtAnalyticsSearchDateFacetValue["LAST_WEEK"] = "LAST_WEEK";
132
+ FtAnalyticsSearchDateFacetValue["LAST_MONTH"] = "LAST_MONTH";
133
+ FtAnalyticsSearchDateFacetValue["LAST_QUARTER"] = "LAST_QUARTER";
134
+ FtAnalyticsSearchDateFacetValue["LAST_YEAR"] = "LAST_YEAR";
135
+ })(FtAnalyticsSearchDateFacetValue || (FtAnalyticsSearchDateFacetValue = {}));
136
+ export const isFtAnalyticsSearchDateFacetValue = (o) => Object.keys(FtAnalyticsSearchDateFacetValue).includes(o);
137
+ // From: AnalyticsSearchFacetType
138
+ export var FtAnalyticsSearchFacetType;
139
+ (function (FtAnalyticsSearchFacetType) {
140
+ FtAnalyticsSearchFacetType["VALUE"] = "VALUE";
141
+ FtAnalyticsSearchFacetType["DATE"] = "DATE";
142
+ FtAnalyticsSearchFacetType["RANGE"] = "RANGE";
143
+ })(FtAnalyticsSearchFacetType || (FtAnalyticsSearchFacetType = {}));
144
+ export const isFtAnalyticsSearchFacetType = (o) => Object.keys(FtAnalyticsSearchFacetType).includes(o);
145
+ export const isFtAnalyticsEvent = (o) => {
146
+ return isObject(o)
147
+ && (isBoolean(o.offline))
148
+ && (isString(o.appVersion))
149
+ && (isString(o.appName))
150
+ && (isFtAnalyticsEventName(o.name))
151
+ && (isString(o.version));
152
+ };
153
+ // From: WsAnalyticsEventName
154
+ export var FtAnalyticsEventName;
155
+ (function (FtAnalyticsEventName) {
156
+ FtAnalyticsEventName["BOOKMARK__CREATE"] = "BOOKMARK__CREATE";
157
+ FtAnalyticsEventName["BOOKMARK__DELETE"] = "BOOKMARK__DELETE";
158
+ FtAnalyticsEventName["CASE_DEFLECTION__START"] = "CASE_DEFLECTION__START";
159
+ FtAnalyticsEventName["CASE_DEFLECTION__OPEN_TICKET"] = "CASE_DEFLECTION__OPEN_TICKET";
160
+ FtAnalyticsEventName["CASE_DEFLECTION__RATE"] = "CASE_DEFLECTION__RATE";
161
+ FtAnalyticsEventName["COLLECTION__CREATE"] = "COLLECTION__CREATE";
162
+ FtAnalyticsEventName["COLLECTION__UPDATE"] = "COLLECTION__UPDATE";
163
+ FtAnalyticsEventName["COLLECTION__DELETE"] = "COLLECTION__DELETE";
164
+ FtAnalyticsEventName["DOCUMENT__DISPLAY"] = "DOCUMENT__DISPLAY";
165
+ FtAnalyticsEventName["DOCUMENT__DOWNLOAD"] = "DOCUMENT__DOWNLOAD";
166
+ FtAnalyticsEventName["DOCUMENT__PRINT"] = "DOCUMENT__PRINT";
167
+ FtAnalyticsEventName["DOCUMENT__PROCESS"] = "DOCUMENT__PROCESS";
168
+ FtAnalyticsEventName["DOCUMENT__RATE"] = "DOCUMENT__RATE";
169
+ FtAnalyticsEventName["DOCUMENT__SEARCH"] = "DOCUMENT__SEARCH";
170
+ FtAnalyticsEventName["DOCUMENT__START_DISPLAY"] = "DOCUMENT__START_DISPLAY";
171
+ FtAnalyticsEventName["DOCUMENT__UNRATE"] = "DOCUMENT__UNRATE";
172
+ FtAnalyticsEventName["FEEDBACK__SEND"] = "FEEDBACK__SEND";
173
+ FtAnalyticsEventName["GEN_AI__COMPLETED_QUERY"] = "GEN_AI__COMPLETED_QUERY";
174
+ FtAnalyticsEventName["GEN_AI__RATE"] = "GEN_AI__RATE";
175
+ FtAnalyticsEventName["GENAI_CASE_DEFLECTION__START"] = "GENAI_CASE_DEFLECTION__START";
176
+ FtAnalyticsEventName["GENAI_CASE_DEFLECTION__OPEN_TICKET"] = "GENAI_CASE_DEFLECTION__OPEN_TICKET";
177
+ FtAnalyticsEventName["KHUB__PROCESS"] = "KHUB__PROCESS";
178
+ FtAnalyticsEventName["KHUB__SEARCH"] = "KHUB__SEARCH";
179
+ FtAnalyticsEventName["LABELS__DOWNLOAD"] = "LABELS__DOWNLOAD";
180
+ FtAnalyticsEventName["LINK__SHARE"] = "LINK__SHARE";
181
+ FtAnalyticsEventName["PAGE__DISPLAY"] = "PAGE__DISPLAY";
182
+ FtAnalyticsEventName["PERSONAL_BOOK__CREATE"] = "PERSONAL_BOOK__CREATE";
183
+ FtAnalyticsEventName["PERSONAL_BOOK__DELETE"] = "PERSONAL_BOOK__DELETE";
184
+ FtAnalyticsEventName["PERSONAL_BOOK__UPDATE"] = "PERSONAL_BOOK__UPDATE";
185
+ FtAnalyticsEventName["PERSONAL_TOPIC__CREATE"] = "PERSONAL_TOPIC__CREATE";
186
+ FtAnalyticsEventName["PERSONAL_TOPIC__UPDATE"] = "PERSONAL_TOPIC__UPDATE";
187
+ FtAnalyticsEventName["PERSONAL_TOPIC__DELETE"] = "PERSONAL_TOPIC__DELETE";
188
+ FtAnalyticsEventName["SAVED_SEARCH__CREATE"] = "SAVED_SEARCH__CREATE";
189
+ FtAnalyticsEventName["SAVED_SEARCH__DELETE"] = "SAVED_SEARCH__DELETE";
190
+ FtAnalyticsEventName["SAVED_SEARCH__UPDATE"] = "SAVED_SEARCH__UPDATE";
191
+ FtAnalyticsEventName["SEARCH_PAGE__SELECT"] = "SEARCH_PAGE__SELECT";
192
+ FtAnalyticsEventName["TOPIC__DISPLAY"] = "TOPIC__DISPLAY";
193
+ FtAnalyticsEventName["TOPIC__RATE"] = "TOPIC__RATE";
194
+ FtAnalyticsEventName["TOPIC__START_DISPLAY"] = "TOPIC__START_DISPLAY";
195
+ FtAnalyticsEventName["TOPIC__UNRATE"] = "TOPIC__UNRATE";
196
+ FtAnalyticsEventName["USER__LOGIN"] = "USER__LOGIN";
197
+ FtAnalyticsEventName["USER__LOGOUT"] = "USER__LOGOUT";
198
+ FtAnalyticsEventName["HEARTBEAT"] = "HEARTBEAT";
199
+ })(FtAnalyticsEventName || (FtAnalyticsEventName = {}));
200
+ export const isFtAnalyticsEventName = (o) => Object.keys(FtAnalyticsEventName).includes(o);
201
+ export const isFtCaseDeflectionEvent = (o) => {
202
+ return isObject(o)
203
+ && (o.searchQuery == null || isFtAnalyticsEventSearchQuery(o.searchQuery))
204
+ && (isString(o.context))
205
+ && (o.rating == null || isFtAnalyticsEventRating(o.rating))
206
+ && (o.topic == null || isFtAnalyticsEventTopic(o.topic));
207
+ };
208
+ export const isFtDocumentDisplayEvent = (o) => {
209
+ return isObject(o)
210
+ && (isFtAnalyticsEventPublication(o.publication))
211
+ && (isNumber(o.viewDurationMs))
212
+ && (isFtAnalyticsEventLocation(o.location));
213
+ };
214
+ export const isFtDocumentDownloadEvent = (o) => {
215
+ return isObject(o)
216
+ && (isFtAnalyticsEventPublication(o.document))
217
+ && (isFtAnalyticsEventLocation(o.location));
218
+ };
219
+ export const isFtDocumentPrintEvent = (o) => {
220
+ return isObject(o)
221
+ && (isFtAnalyticsEventPublication(o.publication));
222
+ };
223
+ export const isFtDocumentSearchEvent = (o) => {
224
+ return isObject(o)
225
+ && (isFtAnalyticsEventSearchResponse(o.searchResponse))
226
+ && (isFtAnalyticsEventPublication(o.publication))
227
+ && (isFtAnalyticsEventSearchQuery(o.searchQuery));
228
+ };
229
+ export const isFtDocumentStartDisplayEvent = (o) => {
230
+ return isObject(o)
231
+ && (isFtAnalyticsEventPublication(o.publication))
232
+ && (isFtAnalyticsEventLocation(o.location));
233
+ };
234
+ export const isFtFeedbackSendEvent = (o) => {
235
+ return isObject(o)
236
+ && ((Array.isArray(o.breadcrumb)
237
+ && o.breadcrumb.every((v) => isFtAnalyticsEventTopic(v))))
238
+ && (isFtAnalyticsEventPublication(o.publication))
239
+ && (isBoolean(o.loggedIn));
240
+ };
241
+ export const isFtGenAiCaseDeflectionEvent = (o) => {
242
+ return isObject(o)
243
+ && (o.generationId == null || isString(o.generationId))
244
+ && (o.searchQuery == null || isFtAnalyticsEventSearchQuery(o.searchQuery))
245
+ && (isString(o.context));
246
+ };
247
+ export const isFtGenAiCompletedQueryEvent = (o) => {
248
+ return isObject(o)
249
+ && (isString(o.result))
250
+ && (isFtAnalyticsEventGenAIProfile(o.profile))
251
+ && (isNumber(o.durationMs))
252
+ && (o.parameters == null || (isObject(o.parameters)
253
+ && Object.keys(o.parameters).every((k) => isString(k))
254
+ && Object.values(o.parameters).every((v) => isString(v))))
255
+ && (isString(o.queryId));
256
+ };
257
+ export const isFtGenAiRateEvent = (o) => {
258
+ return isObject(o)
259
+ && (isFtAnalyticsEventRating(o.rating))
260
+ && (isString(o.comment))
261
+ && (isString(o.queryId));
262
+ };
263
+ export const isFtKhubSearchEvent = (o) => {
264
+ return isObject(o)
265
+ && (isFtAnalyticsEventSearchResponse(o.searchResponse))
266
+ && (isFtAnalyticsEventSearchQuery(o.searchQuery));
267
+ };
268
+ export const isFtLabelsDownloadEvent = (o) => {
269
+ return isObject(o)
270
+ && (isString(o.locale));
271
+ };
272
+ export const isFtLinkShareEvent = (o) => {
273
+ return isObject(o)
274
+ && ((Array.isArray(o.breadcrumb)
275
+ && o.breadcrumb.every((v) => isFtAnalyticsEventTopic(v))))
276
+ && (isFtAnalyticsEventPublication(o.publication));
277
+ };
278
+ export const isFtPageDisplayEvent = (o) => {
279
+ return isObject(o)
280
+ && (isFtAnalyticsEventOrigin(o.origin))
281
+ && (isFtAnalyticsEventDisplay(o.display))
282
+ && (isFtAnalyticsEventPage(o.page));
283
+ };
284
+ export const isFtSearchPageSelectEvent = (o) => {
285
+ return isObject(o)
286
+ && (isFtAnalyticsEventSearchResult(o.searchResult))
287
+ && (o.externalLink == null || isString(o.externalLink))
288
+ && (isFtAnalyticsEventSearchQuery(o.searchQuery));
289
+ };
290
+ export const isFtTopicDisplayEvent = (o) => {
291
+ return isObject(o)
292
+ && ((Array.isArray(o.breadcrumb)
293
+ && o.breadcrumb.every((v) => isFtAnalyticsEventTopic(v))))
294
+ && (isFtAnalyticsEventPublication(o.publication))
295
+ && (isNumber(o.viewDurationMs))
296
+ && (isFtAnalyticsEventLocation(o.location));
297
+ };
298
+ export const isFtTopicStartDisplayEvent = (o) => {
299
+ return isObject(o)
300
+ && ((Array.isArray(o.breadcrumb)
301
+ && o.breadcrumb.every((v) => isFtAnalyticsEventTopic(v))))
302
+ && (isFtAnalyticsEventPublication(o.publication))
303
+ && (isFtAnalyticsEventLocation(o.location));
36
304
  };
37
305
  export const isFtCredentials = (o) => {
38
306
  return isObject(o)
@@ -102,7 +370,6 @@ export const isFtMap = (o) => {
102
370
  && o.metadata.every((v) => isFtMetadata(v))))
103
371
  && (o.watermark == null || isFtWatermark(o.watermark))
104
372
  && (isFtOpenMode(o.openMode))
105
- && (o.translatedTitle == null || o.translatedTitle == null || isString(o.translatedTitle))
106
373
  && (o.topicsApiEndpoint == null || isString(o.topicsApiEndpoint))
107
374
  && (o.description == null || isString(o.description))
108
375
  && (o.attachmentsApiEndpoint == null || isString(o.attachmentsApiEndpoint))
@@ -137,7 +404,6 @@ export const isFtTocNode = (o) => {
137
404
  && (isString(o.tocId))
138
405
  && ((Array.isArray(o.children)
139
406
  && o.children.every((v) => isFtTocNode(v))))
140
- && (o.translatedTitle == null || o.translatedTitle == null || isString(o.translatedTitle))
141
407
  && (o.origin == null || isFtTopicOrigin(o.origin))
142
408
  && (isString(o.contentId))
143
409
  && (isString(o.title));
@@ -192,9 +458,7 @@ export var FtTopicContentTarget;
192
458
  FtTopicContentTarget["PAGES"] = "PAGES";
193
459
  FtTopicContentTarget["DESIGNED_READER"] = "DESIGNED_READER";
194
460
  })(FtTopicContentTarget || (FtTopicContentTarget = {}));
195
- export const isFtTopicContentTarget = (o) => {
196
- return ["THIRD_PARTY", "OFF_THE_GRID", "CONTENT_PACKAGER", "PAGES", "DESIGNED_READER"].includes(o);
197
- };
461
+ export const isFtTopicContentTarget = (o) => Object.keys(FtTopicContentTarget).includes(o);
198
462
  // From: ExternalWebComponentContext
199
463
  export var FtExternalWebComponentContext;
200
464
  (function (FtExternalWebComponentContext) {
@@ -206,9 +470,7 @@ export var FtExternalWebComponentContext;
206
470
  FtExternalWebComponentContext["SEARCH"] = "SEARCH";
207
471
  FtExternalWebComponentContext["SEARCH_RESULT"] = "SEARCH_RESULT";
208
472
  })(FtExternalWebComponentContext || (FtExternalWebComponentContext = {}));
209
- export const isFtExternalWebComponentContext = (o) => {
210
- return ["HOMEPAGE", "CUSTOM", "HEADER", "READER", "TOPIC_TEMPLATE", "SEARCH", "SEARCH_RESULT"].includes(o);
211
- };
473
+ export const isFtExternalWebComponentContext = (o) => Object.keys(FtExternalWebComponentContext).includes(o);
212
474
  export const isFtFeedbackCreation = (o) => {
213
475
  return isObject(o)
214
476
  && (o.from == null || isString(o.from))
@@ -221,9 +483,7 @@ export var FtMetadataHomeLayout;
221
483
  FtMetadataHomeLayout["CUSTOM"] = "CUSTOM";
222
484
  FtMetadataHomeLayout["DESIGNER"] = "DESIGNER";
223
485
  })(FtMetadataHomeLayout || (FtMetadataHomeLayout = {}));
224
- export const isFtMetadataHomeLayout = (o) => {
225
- return ["CLASSIC", "CUSTOM", "DESIGNER"].includes(o);
226
- };
486
+ export const isFtMetadataHomeLayout = (o) => Object.keys(FtMetadataHomeLayout).includes(o);
227
487
  export const isFtDefaultLocale = (o) => {
228
488
  return isObject(o)
229
489
  && (isString(o.lang))
@@ -275,9 +535,7 @@ export var FtFacetType;
275
535
  FtFacetType["OR"] = "OR";
276
536
  FtFacetType["MONOVALUED"] = "MONOVALUED";
277
537
  })(FtFacetType || (FtFacetType = {}));
278
- export const isFtFacetType = (o) => {
279
- return ["AND", "OR", "MONOVALUED"].includes(o);
280
- };
538
+ export const isFtFacetType = (o) => Object.keys(FtFacetType).includes(o);
281
539
  export const isFtMetadata = (o) => {
282
540
  return isObject(o)
283
541
  && ((Array.isArray(o.values)
@@ -295,9 +553,7 @@ export var FtMetadataSortRule;
295
553
  FtMetadataSortRule["ALPHABET"] = "ALPHABET";
296
554
  FtMetadataSortRule["VERSION"] = "VERSION";
297
555
  })(FtMetadataSortRule || (FtMetadataSortRule = {}));
298
- export const isFtMetadataSortRule = (o) => {
299
- return ["NONE", "ALPHABET", "VERSION"].includes(o);
300
- };
556
+ export const isFtMetadataSortRule = (o) => Object.keys(FtMetadataSortRule).includes(o);
301
557
  export const isFtMetadataConfiguration = (o) => {
302
558
  return isObject(o)
303
559
  && ((Array.isArray(o.descriptors)
@@ -336,6 +592,12 @@ export const isFtMySearchRequest = (o) => {
336
592
  && o.metadataFilters.every((v) => isFtLabeledMetadataFilter(v))))
337
593
  && (o.contentLocale == null || isString(o.contentLocale));
338
594
  };
595
+ export const isFtPrivacyPolicyConfiguration = (o) => {
596
+ return isObject(o)
597
+ && (isString(o.policyDescription))
598
+ && (isBoolean(o.agreementRequired))
599
+ && (isString(o.userAgreementMessage));
600
+ };
339
601
  // From: RatingType
340
602
  export var FtRatingType;
341
603
  (function (FtRatingType) {
@@ -344,9 +606,7 @@ export var FtRatingType;
344
606
  FtRatingType["DICHOTOMOUS"] = "DICHOTOMOUS";
345
607
  FtRatingType["NO_RATING"] = "NO_RATING";
346
608
  })(FtRatingType || (FtRatingType = {}));
347
- export const isFtRatingType = (o) => {
348
- return ["STARS", "LIKE", "DICHOTOMOUS", "NO_RATING"].includes(o);
349
- };
609
+ export const isFtRatingType = (o) => Object.keys(FtRatingType).includes(o);
350
610
  export const isFtPublicationRating = (o) => {
351
611
  return isObject(o)
352
612
  && (isString(o.date))
@@ -410,9 +670,7 @@ export var FtPeriodFilterType;
410
670
  FtPeriodFilterType["LAST_YEAR"] = "LAST_YEAR";
411
671
  FtPeriodFilterType["CUSTOM"] = "CUSTOM";
412
672
  })(FtPeriodFilterType || (FtPeriodFilterType = {}));
413
- export const isFtPeriodFilterType = (o) => {
414
- return ["LAST_WEEK", "LAST_MONTH", "LAST_QUARTER", "LAST_YEAR", "CUSTOM"].includes(o);
415
- };
673
+ export const isFtPeriodFilterType = (o) => Object.keys(FtPeriodFilterType).includes(o);
416
674
  export const isFtSearchPreset = (o) => {
417
675
  return isObject(o)
418
676
  && (isString(o.name))
@@ -427,18 +685,14 @@ export var FtSearchSortCriterionOrder;
427
685
  FtSearchSortCriterionOrder["ASC"] = "ASC";
428
686
  FtSearchSortCriterionOrder["DESC"] = "DESC";
429
687
  })(FtSearchSortCriterionOrder || (FtSearchSortCriterionOrder = {}));
430
- export const isFtSearchSortCriterionOrder = (o) => {
431
- return ["ASC", "DESC"].includes(o);
432
- };
688
+ export const isFtSearchSortCriterionOrder = (o) => Object.keys(FtSearchSortCriterionOrder).includes(o);
433
689
  // From: SearchSortCriterionType
434
690
  export var FtSearchSortCriterionType;
435
691
  (function (FtSearchSortCriterionType) {
436
692
  FtSearchSortCriterionType["ALPHA"] = "ALPHA";
437
693
  FtSearchSortCriterionType["NATURAL"] = "NATURAL";
438
694
  })(FtSearchSortCriterionType || (FtSearchSortCriterionType = {}));
439
- export const isFtSearchSortCriterionType = (o) => {
440
- return ["ALPHA", "NATURAL"].includes(o);
441
- };
695
+ export const isFtSearchSortCriterionType = (o) => Object.keys(FtSearchSortCriterionType).includes(o);
442
696
  // From: VirtualField
443
697
  export var FtVirtualField;
444
698
  (function (FtVirtualField) {
@@ -446,9 +700,7 @@ export var FtVirtualField;
446
700
  FtVirtualField["TITLE_ONLY"] = "TITLE_ONLY";
447
701
  FtVirtualField["NONE"] = "NONE";
448
702
  })(FtVirtualField || (FtVirtualField = {}));
449
- export const isFtVirtualField = (o) => {
450
- return ["EVERYWHERE", "TITLE_ONLY", "NONE"].includes(o);
451
- };
703
+ export const isFtVirtualField = (o) => Object.keys(FtVirtualField).includes(o);
452
704
  export const isFtSearchResultsPageInfo = (o) => {
453
705
  return isObject(o)
454
706
  && (isNumber(o.totalResultsCount))
@@ -463,18 +715,14 @@ export var FtEditorialType;
463
715
  FtEditorialType["BOOK"] = "BOOK";
464
716
  FtEditorialType["SHARED_BOOK"] = "SHARED_BOOK";
465
717
  })(FtEditorialType || (FtEditorialType = {}));
466
- export const isFtEditorialType = (o) => {
467
- return ["ARTICLE", "BOOK", "SHARED_BOOK"].includes(o);
468
- };
718
+ export const isFtEditorialType = (o) => Object.keys(FtEditorialType).includes(o);
469
719
  // From: WsOpenMode
470
720
  export var FtOpenMode;
471
721
  (function (FtOpenMode) {
472
722
  FtOpenMode["FLUIDTOPICS"] = "FLUIDTOPICS";
473
723
  FtOpenMode["EXTERNAL"] = "EXTERNAL";
474
724
  })(FtOpenMode || (FtOpenMode = {}));
475
- export const isFtOpenMode = (o) => {
476
- return ["FLUIDTOPICS", "EXTERNAL"].includes(o);
477
- };
725
+ export const isFtOpenMode = (o) => Object.keys(FtOpenMode).includes(o);
478
726
  export const isFtPageRequest = (o) => {
479
727
  return isObject(o)
480
728
  && (o.perPage == null || isNumber(o.perPage))
@@ -493,9 +741,7 @@ export var FtCollectionDocumentType;
493
741
  FtCollectionDocumentType["PERSONAL_BOOK"] = "PERSONAL_BOOK";
494
742
  FtCollectionDocumentType["SHARED_BOOK"] = "SHARED_BOOK";
495
743
  })(FtCollectionDocumentType || (FtCollectionDocumentType = {}));
496
- export const isFtCollectionDocumentType = (o) => {
497
- return ["MAP", "DOCUMENT", "TOPIC", "PERSONAL_BOOK", "SHARED_BOOK"].includes(o);
498
- };
744
+ export const isFtCollectionDocumentType = (o) => Object.keys(FtCollectionDocumentType).includes(o);
499
745
  export const isFtDateFilter = (o) => {
500
746
  return isObject(o)
501
747
  && (isFtDateFilterType(o.type));
@@ -508,9 +754,7 @@ export var FtDateFilterType;
508
754
  FtDateFilterType["LAST_QUARTER"] = "LAST_QUARTER";
509
755
  FtDateFilterType["LAST_YEAR"] = "LAST_YEAR";
510
756
  })(FtDateFilterType || (FtDateFilterType = {}));
511
- export const isFtDateFilterType = (o) => {
512
- return ["LAST_WEEK", "LAST_MONTH", "LAST_QUARTER", "LAST_YEAR"].includes(o);
513
- };
757
+ export const isFtDateFilterType = (o) => Object.keys(FtDateFilterType).includes(o);
514
758
  export const isFtSearchResults = (o) => {
515
759
  return isObject(o)
516
760
  && (o.spellcheck == null || isFtSpellcheck(o.spellcheck))
@@ -672,9 +916,7 @@ export var FtSearchResultType;
672
916
  FtSearchResultType["DOCUMENT"] = "DOCUMENT";
673
917
  FtSearchResultType["TOPIC"] = "TOPIC";
674
918
  })(FtSearchResultType || (FtSearchResultType = {}));
675
- export const isFtSearchResultType = (o) => {
676
- return ["MAP", "DOCUMENT", "TOPIC"].includes(o);
677
- };
919
+ export const isFtSearchResultType = (o) => Object.keys(FtSearchResultType).includes(o);
678
920
  // From: WsPublicSearchScope
679
921
  export var FtSearchScope;
680
922
  (function (FtSearchScope) {
@@ -683,9 +925,7 @@ export var FtSearchScope;
683
925
  FtSearchScope["ALL_TOPICS"] = "ALL_TOPICS";
684
926
  FtSearchScope["TOPICS_AND_UNSTRUCTURED_DOCUMENTS"] = "TOPICS_AND_UNSTRUCTURED_DOCUMENTS";
685
927
  })(FtSearchScope || (FtSearchScope = {}));
686
- export const isFtSearchScope = (o) => {
687
- return ["DEFAULT", "DOCUMENTS", "ALL_TOPICS", "TOPICS_AND_UNSTRUCTURED_DOCUMENTS"].includes(o);
688
- };
928
+ export const isFtSearchScope = (o) => Object.keys(FtSearchScope).includes(o);
689
929
  export const isFtValueFilter = (o) => {
690
930
  return isObject(o)
691
931
  && (isBoolean(o.negative))
@@ -777,6 +1017,7 @@ export var FtUserRole;
777
1017
  FtUserRole["RATING_USER"] = "RATING_USER";
778
1018
  FtUserRole["FEEDBACK_USER"] = "FEEDBACK_USER";
779
1019
  FtUserRole["GENERATIVE_AI_USER"] = "GENERATIVE_AI_USER";
1020
+ FtUserRole["GENERATIVE_AI_EXPORT_USER"] = "GENERATIVE_AI_EXPORT_USER";
780
1021
  FtUserRole["CONTENT_PUBLISHER"] = "CONTENT_PUBLISHER";
781
1022
  FtUserRole["KHUB_ADMIN"] = "KHUB_ADMIN";
782
1023
  FtUserRole["USERS_ADMIN"] = "USERS_ADMIN";
@@ -784,9 +1025,7 @@ export var FtUserRole;
784
1025
  FtUserRole["ADMIN"] = "ADMIN";
785
1026
  FtUserRole["DEVELOPER"] = "DEVELOPER";
786
1027
  })(FtUserRole || (FtUserRole = {}));
787
- export const isFtUserRole = (o) => {
788
- 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", "GENERATIVE_AI_USER", "CONTENT_PUBLISHER", "KHUB_ADMIN", "USERS_ADMIN", "PORTAL_ADMIN", "ADMIN", "DEVELOPER"].includes(o);
789
- };
1028
+ export const isFtUserRole = (o) => Object.keys(FtUserRole).includes(o);
790
1029
  export const isFtAuthenticationIdentifier = (o) => {
791
1030
  return isObject(o)
792
1031
  && (isString(o.identifier))
@@ -816,9 +1055,11 @@ export const isFtUserProfile = (o) => {
816
1055
  return isObject(o)
817
1056
  && (o.emailAddress == null || isString(o.emailAddress))
818
1057
  && (o.displayName == null || isString(o.displayName))
1058
+ && (o.otpValidated == null || isBoolean(o.otpValidated))
819
1059
  && ((Array.isArray(o.roles)
820
1060
  && o.roles.every((v) => isFtUserRole(v))))
821
1061
  && (o.userId == null || isString(o.userId))
1062
+ && (o.privacyPolicyAgreementDate == null || isString(o.privacyPolicyAgreementDate))
822
1063
  && ((Array.isArray(o.tags)
823
1064
  && o.tags.every((v) => isString(v))));
824
1065
  };
@@ -58,22 +58,6 @@ export interface FtTranslationInput {
58
58
  sourceLanguage?: string;
59
59
  }
60
60
  export declare const isFtTranslationInput: (o: any) => o is FtTranslationInput;
61
- export interface FtTranslationLanguagesInput {
62
- profileId: string;
63
- sourceLanguage?: string;
64
- }
65
- export declare const isFtTranslationLanguagesInput: (o: any) => o is FtTranslationLanguagesInput;
66
- export interface FtTranslationSettingsInput {
67
- profileId: string;
68
- destinationLanguage: string;
69
- sourceLanguage?: string;
70
- }
71
- export declare const isFtTranslationSettingsInput: (o: any) => o is FtTranslationSettingsInput;
72
- export interface FtTranslationLanguagesResponse {
73
- code: string;
74
- label: string;
75
- }
76
- export declare const isFtTranslationLanguagesResponse: (o: any) => o is FtTranslationLanguagesResponse;
77
61
  export interface FtMapAttachment {
78
62
  file: string;
79
63
  size?: number;
@@ -100,7 +84,6 @@ export interface FtPaginatedTocNode {
100
84
  pageToc?: Array<any>;
101
85
  tocId?: string;
102
86
  children: Array<FtPaginatedTocNode>;
103
- translatedTitle?: string;
104
87
  pageConfiguration?: FtPageConfiguration;
105
88
  origin?: any;
106
89
  contentId?: string;
@@ -123,7 +106,8 @@ export interface FtSemanticSearchResponseItem {
123
106
  }
124
107
  export declare const isFtSemanticSearchResponseItem: (o: any) => o is FtSemanticSearchResponseItem;
125
108
  export interface FtSemanticSearchFilter {
126
- values: Array<string>;
109
+ values?: Array<string>;
110
+ hierarchicalValues?: Array<Array<string>>;
127
111
  key: string;
128
112
  }
129
113
  export declare const isFtSemanticSearchFilter: (o: any) => o is FtSemanticSearchFilter;
@@ -8,9 +8,7 @@ export var FtConfigurationHistoryEntryStatus;
8
8
  FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
9
9
  FtConfigurationHistoryEntryStatus["INVALID"] = "INVALID";
10
10
  })(FtConfigurationHistoryEntryStatus || (FtConfigurationHistoryEntryStatus = {}));
11
- export const isFtConfigurationHistoryEntryStatus = (o) => {
12
- return ["VALID", "INVALID"].includes(o);
13
- };
11
+ export const isFtConfigurationHistoryEntryStatus = (o) => Object.keys(FtConfigurationHistoryEntryStatus).includes(o);
14
12
  export const isFtReaderConfiguration = (o) => {
15
13
  return isObject(o)
16
14
  && (isFtReaderFeedbackConfiguration(o.feedback))
@@ -63,9 +61,7 @@ export var TranslationFormat;
63
61
  TranslationFormat["TEXT"] = "TEXT";
64
62
  TranslationFormat["HTML"] = "HTML";
65
63
  })(TranslationFormat || (TranslationFormat = {}));
66
- export const isTranslationFormat = (o) => {
67
- return ["TEXT", "HTML"].includes(o);
68
- };
64
+ export const isTranslationFormat = (o) => Object.keys(TranslationFormat).includes(o);
69
65
  export const isFtTranslationInput = (o) => {
70
66
  return isObject(o)
71
67
  && (isString(o.profileId))
@@ -74,22 +70,6 @@ export const isFtTranslationInput = (o) => {
74
70
  && (isString(o.content))
75
71
  && (o.sourceLanguage == null || isString(o.sourceLanguage));
76
72
  };
77
- export const isFtTranslationLanguagesInput = (o) => {
78
- return isObject(o)
79
- && (isString(o.profileId))
80
- && (o.sourceLanguage == null || isString(o.sourceLanguage));
81
- };
82
- export const isFtTranslationSettingsInput = (o) => {
83
- return isObject(o)
84
- && (isString(o.profileId))
85
- && (isString(o.destinationLanguage))
86
- && (o.sourceLanguage == null || isString(o.sourceLanguage));
87
- };
88
- export const isFtTranslationLanguagesResponse = (o) => {
89
- return isObject(o)
90
- && (isString(o.code))
91
- && (isString(o.label));
92
- };
93
73
  export const isFtMapAttachment = (o) => {
94
74
  return isObject(o)
95
75
  && (isString(o.file))
@@ -120,7 +100,6 @@ export const isFtPaginatedTocNode = (o) => {
120
100
  && (o.tocId == null || isString(o.tocId))
121
101
  && ((Array.isArray(o.children)
122
102
  && o.children.every((v) => isFtPaginatedTocNode(v))))
123
- && (o.translatedTitle == null || isString(o.translatedTitle))
124
103
  && (o.pageConfiguration == null || isFtPageConfiguration(o.pageConfiguration))
125
104
  && (o.contentId == null || isString(o.contentId))
126
105
  && (o.title == null || isString(o.title));
@@ -147,8 +126,11 @@ export const isFtSemanticSearchResponseItem = (o) => {
147
126
  };
148
127
  export const isFtSemanticSearchFilter = (o) => {
149
128
  return isObject(o)
150
- && ((Array.isArray(o.values)
129
+ && (o.values == null || (Array.isArray(o.values)
151
130
  && o.values.every((v) => isString(v))))
131
+ && (o.hierarchicalValues == null || (Array.isArray(o.hierarchicalValues)
132
+ && o.hierarchicalValues.every((v) => (Array.isArray(v)
133
+ && v.every((v) => isString(v))))))
152
134
  && (isString(o.key));
153
135
  };
154
136
  export const isFtSemanticSearchRequest = (o) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/public-api",
3
- "version": "1.0.84-alpha",
3
+ "version": "1.0.86-alpha1",
4
4
  "description": "Fluid Topics Public API",
5
5
  "author": "Fluid Topics dev team <opensource@antidot.net>",
6
6
  "license": "LGPL-3.0-only",
package/.npmignore DELETED
@@ -1,14 +0,0 @@
1
- .gradle
2
- .editorconfig
3
- build
4
- build.gradle.kts
5
- node_modules
6
- test
7
- test-browser
8
- packages
9
- src
10
- tsconfig.*
11
- rollup.config.js
12
- INTERNAL_README.md
13
- vite-plugin.mjs
14
- web-test-runner.config.mjs