@fluid-topics/public-api 1.0.113 → 1.0.116

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.
@@ -1,3 +1,4 @@
1
+ import { FtTocNode, FtTopicOrigin, FtWatermark, FtMetadata } from "../ft-common/public";
1
2
  export declare enum FtConfigurationHistoryEntryStatus {
2
3
  VALID = "VALID",
3
4
  INVALID = "INVALID"
@@ -20,6 +21,42 @@ export interface FtReaderFeedbackConfiguration {
20
21
  subjectMetadataIds: Array<string>;
21
22
  }
22
23
  export declare const isFtReaderFeedbackConfiguration: (o: any) => o is FtReaderFeedbackConfiguration;
24
+ export declare enum FtChatbotAdminRatingTag {
25
+ INACCURATE = "INACCURATE",
26
+ INCOMPLETE = "INCOMPLETE",
27
+ OFF_TOPIC = "OFF_TOPIC",
28
+ IRRELEVANT_SOURCES = "IRRELEVANT_SOURCES",
29
+ SUMMARY = "SUMMARY",
30
+ SEMANTIC_SEARCH = "SEMANTIC_SEARCH",
31
+ CHATBOT_INSTRUCTIONS = "CHATBOT_INSTRUCTIONS",
32
+ OTHER = "OTHER"
33
+ }
34
+ export type FtChatbotAdminRatingTagKeys = keyof typeof FtChatbotAdminRatingTag;
35
+ export declare const isFtChatbotAdminRatingTag: (o: any) => o is FtChatbotAdminRatingTag;
36
+ export declare enum FtChatbotUserRatingTag {
37
+ INACCURATE = "INACCURATE",
38
+ INCOMPLETE = "INCOMPLETE",
39
+ OFF_TOPIC = "OFF_TOPIC",
40
+ IRRELEVANT_SOURCES = "IRRELEVANT_SOURCES",
41
+ SLOW = "SLOW",
42
+ OTHER = "OTHER"
43
+ }
44
+ export type FtChatbotUserRatingTagKeys = keyof typeof FtChatbotUserRatingTag;
45
+ export declare const isFtChatbotUserRatingTag: (o: any) => o is FtChatbotUserRatingTag;
46
+ export interface FtGenAIChatbotAdminRating {
47
+ profileId: string;
48
+ comment?: string;
49
+ value: number;
50
+ tags?: Array<FtChatbotAdminRatingTagKeys>;
51
+ }
52
+ export declare const isFtGenAIChatbotAdminRating: (o: any) => o is FtGenAIChatbotAdminRating;
53
+ export interface FtGenAIChatbotUserRating {
54
+ profileId: string;
55
+ comment?: string;
56
+ value: number;
57
+ tags?: Array<FtChatbotUserRatingTagKeys>;
58
+ }
59
+ export declare const isFtGenAIChatbotUserRating: (o: any) => o is FtGenAIChatbotUserRating;
23
60
  export interface FtGenAIRating {
24
61
  rating: number;
25
62
  comment: string;
@@ -130,7 +167,7 @@ export declare enum RagTraceMessageType {
130
167
  }
131
168
  export type RagTraceMessageTypeKeys = keyof typeof RagTraceMessageType;
132
169
  export declare const isRagTraceMessageType: (o: any) => o is RagTraceMessageType;
133
- export interface FtGenAIRagTraceAssistantMessage extends FtGenAIRagTraceDetailHistoryItem {
170
+ export interface FtGenAIRagTraceAssistantMessage/* WsGenAIRagTraceAssistantMessage */ extends FtGenAIRagTraceDetailHistoryItem {
134
171
  chatbotInstructions: string;
135
172
  role: RagTraceMessageTypeKeys;
136
173
  semsearch: FtGenAIRagTraceSemsearch;
@@ -153,10 +190,11 @@ export interface FtGenAIRagTraceDetailHistoryItem {
153
190
  export declare const isFtGenAIRagTraceDetailHistoryItem: (o: any) => o is FtGenAIRagTraceDetailHistoryItem;
154
191
  export interface FtGenAIRagTraceSemsearch {
155
192
  query: string;
193
+ filters?: Array<FtSemanticSearchFilter>;
156
194
  results: Array<FtSemanticSearchResponseItem>;
157
195
  }
158
196
  export declare const isFtGenAIRagTraceSemsearch: (o: any) => o is FtGenAIRagTraceSemsearch;
159
- export interface FtGenAIRagTraceUserMessage extends FtGenAIRagTraceDetailHistoryItem {
197
+ export interface FtGenAIRagTraceUserMessage/* WsGenAIRagTraceUserMessage */ extends FtGenAIRagTraceDetailHistoryItem {
160
198
  role: RagTraceMessageTypeKeys;
161
199
  content: string;
162
200
  timestamp: string;
@@ -195,11 +233,22 @@ export interface FtMapAttachment {
195
233
  externalLink: boolean;
196
234
  name: string;
197
235
  id: string;
198
- mimeType?: string;
199
- viewerUrl?: string;
236
+ mimeType: string;
237
+ viewerUrl: string;
238
+ target: any;
239
+ }
240
+ export interface FtDocumentAttachment {
241
+ file: string;
242
+ size?: number;
243
+ externalLink: boolean;
244
+ name: string;
245
+ id: string;
246
+ mimeType: string;
247
+ viewerUrl: string;
200
248
  target: any;
201
249
  }
202
250
  export declare const isFtMapAttachment: (o: any) => o is FtMapAttachment;
251
+ export declare const isFtDocumentAttachment: (o: any) => o is FtDocumentAttachment;
203
252
  export interface FtPageConfiguration {
204
253
  parentsVisibility?: Array<boolean>;
205
254
  isVisible: boolean;
@@ -214,11 +263,11 @@ export declare const isFtPaginatedToc: (o: any) => o is FtPaginatedToc;
214
263
  export interface FtPaginatedTocNode {
215
264
  prettyUrl?: string;
216
265
  hasRating?: boolean;
217
- pageToc?: Array<any>;
266
+ pageToc?: Array<FtTocNode>;
218
267
  tocId?: string;
219
268
  children: Array<FtPaginatedTocNode>;
220
269
  pageConfiguration?: FtPageConfiguration;
221
- origin?: any;
270
+ origin?: FtTopicOrigin;
222
271
  contentId?: string;
223
272
  untranslatedTitle?: string;
224
273
  title?: string;
@@ -262,24 +311,24 @@ export interface FtSemanticSearchResponseItem {
262
311
  relevance: number;
263
312
  }
264
313
  export declare const isFtSemanticSearchResponseItem: (o: any) => o is FtSemanticSearchResponseItem;
265
- export interface FtSemanticSearchAndFilter extends FtSemanticSearchFilter {
314
+ export interface FtSemanticSearchAndFilter/* WsSemanticSearchAndFilter */ extends FtSemanticSearchFilter {
266
315
  and: Array<FtSemanticSearchFilter>;
267
316
  }
268
317
  export declare const isFtSemanticSearchAndFilter: (o: any) => o is FtSemanticSearchAndFilter;
269
318
  export interface FtSemanticSearchFilter {
270
319
  }
271
320
  export declare const isFtSemanticSearchFilter: (o: any) => o is FtSemanticSearchFilter;
272
- export interface FtSemanticSearchKeyValueFilter extends FtSemanticSearchFilter {
321
+ export interface FtSemanticSearchKeyValueFilter/* WsSemanticSearchKeyValueFilter */ extends FtSemanticSearchFilter {
273
322
  values: Array<string>;
274
323
  hierarchicalValues: Array<Array<string>>;
275
324
  key: string;
276
325
  }
277
326
  export declare const isFtSemanticSearchKeyValueFilter: (o: any) => o is FtSemanticSearchKeyValueFilter;
278
- export interface FtSemanticSearchNotFilter extends FtSemanticSearchFilter {
327
+ export interface FtSemanticSearchNotFilter/* WsSemanticSearchNotFilter */ extends FtSemanticSearchFilter {
279
328
  not: FtSemanticSearchFilter;
280
329
  }
281
330
  export declare const isFtSemanticSearchNotFilter: (o: any) => o is FtSemanticSearchNotFilter;
282
- export interface FtSemanticSearchOrFilter extends FtSemanticSearchFilter {
331
+ export interface FtSemanticSearchOrFilter/* WsSemanticSearchOrFilter */ extends FtSemanticSearchFilter {
283
332
  or: Array<FtSemanticSearchFilter>;
284
333
  }
285
334
  export declare const isFtSemanticSearchOrFilter: (o: any) => o is FtSemanticSearchOrFilter;
@@ -290,3 +339,46 @@ export interface FtSemanticSearchRequest {
290
339
  nbResults?: number;
291
340
  }
292
341
  export declare const isFtSemanticSearchRequest: (o: any) => o is FtSemanticSearchRequest;
342
+ export interface FtAssetDescriptor {
343
+ contentUrl: string;
344
+ filename: string;
345
+ watermark?: FtWatermark;
346
+ size: number;
347
+ displayName: string;
348
+ portalUrl: string;
349
+ fingerprint: string;
350
+ viewableInCurrentBrowser: boolean;
351
+ holder: FtAssetHolder;
352
+ id: string;
353
+ mimeType: string;
354
+ }
355
+ export interface FtMapResource {
356
+ contentUrl: string;
357
+ filename: string;
358
+ watermark?: FtWatermark;
359
+ size: number;
360
+ displayName: string;
361
+ portalUrl: string;
362
+ fingerprint: string;
363
+ viewableInCurrentBrowser: boolean;
364
+ holder: FtAssetHolder;
365
+ id: string;
366
+ mimeType: string;
367
+ }
368
+ export declare const isFtAssetDescriptor: (o: any) => o is FtAssetDescriptor;
369
+ export declare const isFtMapResource: (o: any) => o is FtMapResource;
370
+ export interface FtAssetHolder {
371
+ metadata: Array<FtMetadata>;
372
+ portalUrl: string;
373
+ id: string;
374
+ type: FtAssetHolderTypeKeys;
375
+ lang: string;
376
+ title: string;
377
+ }
378
+ export declare const isFtAssetHolder: (o: any) => o is FtAssetHolder;
379
+ export declare enum FtAssetHolderType {
380
+ MAP = "MAP",
381
+ UNSTRUCTURED_DOCUMENT = "UNSTRUCTURED_DOCUMENT"
382
+ }
383
+ export type FtAssetHolderTypeKeys = keyof typeof FtAssetHolderType;
384
+ export declare const isFtAssetHolderType: (o: any) => o is FtAssetHolderType;
@@ -2,7 +2,6 @@ const isObject = (o) => typeof o === "object" && o != null;
2
2
  const isBoolean = (o) => typeof o === "boolean";
3
3
  const isNumber = (o) => typeof o === "number";
4
4
  const isString = (o) => typeof o === "string";
5
- // From: ConfigurationHistoryEntryStatus
6
5
  export var FtConfigurationHistoryEntryStatus;
7
6
  (function (FtConfigurationHistoryEntryStatus) {
8
7
  FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
@@ -28,6 +27,44 @@ export const isFtReaderFeedbackConfiguration = (o) => {
28
27
  && ((Array.isArray(o.subjectMetadataIds)
29
28
  && o.subjectMetadataIds.every((v) => isString(v))));
30
29
  };
30
+ export var FtChatbotAdminRatingTag;
31
+ (function (FtChatbotAdminRatingTag) {
32
+ FtChatbotAdminRatingTag["INACCURATE"] = "INACCURATE";
33
+ FtChatbotAdminRatingTag["INCOMPLETE"] = "INCOMPLETE";
34
+ FtChatbotAdminRatingTag["OFF_TOPIC"] = "OFF_TOPIC";
35
+ FtChatbotAdminRatingTag["IRRELEVANT_SOURCES"] = "IRRELEVANT_SOURCES";
36
+ FtChatbotAdminRatingTag["SUMMARY"] = "SUMMARY";
37
+ FtChatbotAdminRatingTag["SEMANTIC_SEARCH"] = "SEMANTIC_SEARCH";
38
+ FtChatbotAdminRatingTag["CHATBOT_INSTRUCTIONS"] = "CHATBOT_INSTRUCTIONS";
39
+ FtChatbotAdminRatingTag["OTHER"] = "OTHER";
40
+ })(FtChatbotAdminRatingTag || (FtChatbotAdminRatingTag = {}));
41
+ export const isFtChatbotAdminRatingTag = (o) => Object.keys(FtChatbotAdminRatingTag).includes(o);
42
+ export var FtChatbotUserRatingTag;
43
+ (function (FtChatbotUserRatingTag) {
44
+ FtChatbotUserRatingTag["INACCURATE"] = "INACCURATE";
45
+ FtChatbotUserRatingTag["INCOMPLETE"] = "INCOMPLETE";
46
+ FtChatbotUserRatingTag["OFF_TOPIC"] = "OFF_TOPIC";
47
+ FtChatbotUserRatingTag["IRRELEVANT_SOURCES"] = "IRRELEVANT_SOURCES";
48
+ FtChatbotUserRatingTag["SLOW"] = "SLOW";
49
+ FtChatbotUserRatingTag["OTHER"] = "OTHER";
50
+ })(FtChatbotUserRatingTag || (FtChatbotUserRatingTag = {}));
51
+ export const isFtChatbotUserRatingTag = (o) => Object.keys(FtChatbotUserRatingTag).includes(o);
52
+ export const isFtGenAIChatbotAdminRating = (o) => {
53
+ return isObject(o)
54
+ && (isString(o.profileId))
55
+ && (o.comment == null || isString(o.comment))
56
+ && (isNumber(o.value))
57
+ && (o.tags == null || (Array.isArray(o.tags)
58
+ && o.tags.every((v) => isFtChatbotAdminRatingTag(v))));
59
+ };
60
+ export const isFtGenAIChatbotUserRating = (o) => {
61
+ return isObject(o)
62
+ && (isString(o.profileId))
63
+ && (o.comment == null || isString(o.comment))
64
+ && (isNumber(o.value))
65
+ && (o.tags == null || (Array.isArray(o.tags)
66
+ && o.tags.every((v) => isFtChatbotUserRatingTag(v))));
67
+ };
31
68
  export const isFtGenAIRating = (o) => {
32
69
  return isObject(o)
33
70
  && (isNumber(o.rating))
@@ -41,7 +78,6 @@ export const isFtGenAIGenerateInput = (o) => {
41
78
  && Object.keys(o.parameters).every((k) => isString(k))
42
79
  && Object.values(o.parameters).every((v) => isString(v))));
43
80
  };
44
- // From: RagResponseFormat
45
81
  export var FtRagResponseFormat;
46
82
  (function (FtRagResponseFormat) {
47
83
  FtRagResponseFormat["JSON"] = "JSON";
@@ -171,6 +207,8 @@ export const isFtGenAIRagTraceDetailHistoryItem = (o) => {
171
207
  export const isFtGenAIRagTraceSemsearch = (o) => {
172
208
  return isObject(o)
173
209
  && (isString(o.query))
210
+ && (o.filters == null || (Array.isArray(o.filters)
211
+ && o.filters.every((v) => isFtSemanticSearchFilter(v))))
174
212
  && ((Array.isArray(o.results)
175
213
  && o.results.every((v) => isFtSemanticSearchResponseItem(v))));
176
214
  };
@@ -217,8 +255,18 @@ export const isFtMapAttachment = (o) => {
217
255
  && (isBoolean(o.externalLink))
218
256
  && (isString(o.name))
219
257
  && (isString(o.id))
220
- && (o.mimeType == null || isString(o.mimeType))
221
- && (o.viewerUrl == null || isString(o.viewerUrl));
258
+ && (isString(o.mimeType))
259
+ && (isString(o.viewerUrl));
260
+ };
261
+ export const isFtDocumentAttachment = (o) => {
262
+ return isObject(o)
263
+ && (isString(o.file))
264
+ && (o.size == null || isNumber(o.size))
265
+ && (isBoolean(o.externalLink))
266
+ && (isString(o.name))
267
+ && (isString(o.id))
268
+ && (isString(o.mimeType))
269
+ && (isString(o.viewerUrl));
222
270
  };
223
271
  export const isFtPageConfiguration = (o) => {
224
272
  return isObject(o)
@@ -255,7 +303,6 @@ export const isFtPaginationConfiguration = (o) => {
255
303
  return isObject(o)
256
304
  && (isBoolean(o.splitCurrentPageToc));
257
305
  };
258
- // From: WsTopicContentFormat
259
306
  export var FtTopicContentFormat;
260
307
  (function (FtTopicContentFormat) {
261
308
  FtTopicContentFormat["HTML"] = "HTML";
@@ -327,3 +374,44 @@ export const isFtSemanticSearchRequest = (o) => {
327
374
  && o.filters.every((v) => isFtSemanticSearchFilter(v))))
328
375
  && (o.nbResults == null || isNumber(o.nbResults));
329
376
  };
377
+ export const isFtAssetDescriptor = (o) => {
378
+ return isObject(o)
379
+ && (isString(o.contentUrl))
380
+ && (isString(o.filename))
381
+ && (isNumber(o.size))
382
+ && (isString(o.displayName))
383
+ && (isString(o.portalUrl))
384
+ && (isString(o.fingerprint))
385
+ && (isBoolean(o.viewableInCurrentBrowser))
386
+ && (isFtAssetHolder(o.holder))
387
+ && (isString(o.id))
388
+ && (isString(o.mimeType));
389
+ };
390
+ export const isFtMapResource = (o) => {
391
+ return isObject(o)
392
+ && (isString(o.contentUrl))
393
+ && (isString(o.filename))
394
+ && (isNumber(o.size))
395
+ && (isString(o.displayName))
396
+ && (isString(o.portalUrl))
397
+ && (isString(o.fingerprint))
398
+ && (isBoolean(o.viewableInCurrentBrowser))
399
+ && (isFtAssetHolder(o.holder))
400
+ && (isString(o.id))
401
+ && (isString(o.mimeType));
402
+ };
403
+ export const isFtAssetHolder = (o) => {
404
+ return isObject(o)
405
+ && ((Array.isArray(o.metadata)))
406
+ && (isString(o.portalUrl))
407
+ && (isString(o.id))
408
+ && (isFtAssetHolderType(o.type))
409
+ && (isString(o.lang))
410
+ && (isString(o.title));
411
+ };
412
+ export var FtAssetHolderType;
413
+ (function (FtAssetHolderType) {
414
+ FtAssetHolderType["MAP"] = "MAP";
415
+ FtAssetHolderType["UNSTRUCTURED_DOCUMENT"] = "UNSTRUCTURED_DOCUMENT";
416
+ })(FtAssetHolderType || (FtAssetHolderType = {}));
417
+ export const isFtAssetHolderType = (o) => Object.keys(FtAssetHolderType).includes(o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/public-api",
3
- "version": "1.0.113",
3
+ "version": "1.0.116",
4
4
  "description": "Fluid Topics Public API",
5
5
  "author": "Fluid Topics dev team <opensource@antidot.net>",
6
6
  "license": "LGPL-3.0-only",