@fluid-topics/public-api 1.0.114 → 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;
@@ -157,7 +194,7 @@ export interface FtGenAIRagTraceSemsearch {
157
194
  results: Array<FtSemanticSearchResponseItem>;
158
195
  }
159
196
  export declare const isFtGenAIRagTraceSemsearch: (o: any) => o is FtGenAIRagTraceSemsearch;
160
- export interface FtGenAIRagTraceUserMessage extends FtGenAIRagTraceDetailHistoryItem {
197
+ export interface FtGenAIRagTraceUserMessage/* WsGenAIRagTraceUserMessage */ extends FtGenAIRagTraceDetailHistoryItem {
161
198
  role: RagTraceMessageTypeKeys;
162
199
  content: string;
163
200
  timestamp: string;
@@ -196,11 +233,22 @@ export interface FtMapAttachment {
196
233
  externalLink: boolean;
197
234
  name: string;
198
235
  id: string;
199
- mimeType?: string;
200
- 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;
201
248
  target: any;
202
249
  }
203
250
  export declare const isFtMapAttachment: (o: any) => o is FtMapAttachment;
251
+ export declare const isFtDocumentAttachment: (o: any) => o is FtDocumentAttachment;
204
252
  export interface FtPageConfiguration {
205
253
  parentsVisibility?: Array<boolean>;
206
254
  isVisible: boolean;
@@ -215,11 +263,11 @@ export declare const isFtPaginatedToc: (o: any) => o is FtPaginatedToc;
215
263
  export interface FtPaginatedTocNode {
216
264
  prettyUrl?: string;
217
265
  hasRating?: boolean;
218
- pageToc?: Array<any>;
266
+ pageToc?: Array<FtTocNode>;
219
267
  tocId?: string;
220
268
  children: Array<FtPaginatedTocNode>;
221
269
  pageConfiguration?: FtPageConfiguration;
222
- origin?: any;
270
+ origin?: FtTopicOrigin;
223
271
  contentId?: string;
224
272
  untranslatedTitle?: string;
225
273
  title?: string;
@@ -263,24 +311,24 @@ export interface FtSemanticSearchResponseItem {
263
311
  relevance: number;
264
312
  }
265
313
  export declare const isFtSemanticSearchResponseItem: (o: any) => o is FtSemanticSearchResponseItem;
266
- export interface FtSemanticSearchAndFilter extends FtSemanticSearchFilter {
314
+ export interface FtSemanticSearchAndFilter/* WsSemanticSearchAndFilter */ extends FtSemanticSearchFilter {
267
315
  and: Array<FtSemanticSearchFilter>;
268
316
  }
269
317
  export declare const isFtSemanticSearchAndFilter: (o: any) => o is FtSemanticSearchAndFilter;
270
318
  export interface FtSemanticSearchFilter {
271
319
  }
272
320
  export declare const isFtSemanticSearchFilter: (o: any) => o is FtSemanticSearchFilter;
273
- export interface FtSemanticSearchKeyValueFilter extends FtSemanticSearchFilter {
321
+ export interface FtSemanticSearchKeyValueFilter/* WsSemanticSearchKeyValueFilter */ extends FtSemanticSearchFilter {
274
322
  values: Array<string>;
275
323
  hierarchicalValues: Array<Array<string>>;
276
324
  key: string;
277
325
  }
278
326
  export declare const isFtSemanticSearchKeyValueFilter: (o: any) => o is FtSemanticSearchKeyValueFilter;
279
- export interface FtSemanticSearchNotFilter extends FtSemanticSearchFilter {
327
+ export interface FtSemanticSearchNotFilter/* WsSemanticSearchNotFilter */ extends FtSemanticSearchFilter {
280
328
  not: FtSemanticSearchFilter;
281
329
  }
282
330
  export declare const isFtSemanticSearchNotFilter: (o: any) => o is FtSemanticSearchNotFilter;
283
- export interface FtSemanticSearchOrFilter extends FtSemanticSearchFilter {
331
+ export interface FtSemanticSearchOrFilter/* WsSemanticSearchOrFilter */ extends FtSemanticSearchFilter {
284
332
  or: Array<FtSemanticSearchFilter>;
285
333
  }
286
334
  export declare const isFtSemanticSearchOrFilter: (o: any) => o is FtSemanticSearchOrFilter;
@@ -291,3 +339,46 @@ export interface FtSemanticSearchRequest {
291
339
  nbResults?: number;
292
340
  }
293
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";
@@ -219,8 +255,18 @@ export const isFtMapAttachment = (o) => {
219
255
  && (isBoolean(o.externalLink))
220
256
  && (isString(o.name))
221
257
  && (isString(o.id))
222
- && (o.mimeType == null || isString(o.mimeType))
223
- && (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));
224
270
  };
225
271
  export const isFtPageConfiguration = (o) => {
226
272
  return isObject(o)
@@ -257,7 +303,6 @@ export const isFtPaginationConfiguration = (o) => {
257
303
  return isObject(o)
258
304
  && (isBoolean(o.splitCurrentPageToc));
259
305
  };
260
- // From: WsTopicContentFormat
261
306
  export var FtTopicContentFormat;
262
307
  (function (FtTopicContentFormat) {
263
308
  FtTopicContentFormat["HTML"] = "HTML";
@@ -329,3 +374,44 @@ export const isFtSemanticSearchRequest = (o) => {
329
374
  && o.filters.every((v) => isFtSemanticSearchFilter(v))))
330
375
  && (o.nbResults == null || isNumber(o.nbResults));
331
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.114",
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",