@fluid-topics/public-api 1.0.124 → 1.0.127

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.
@@ -15,8 +15,9 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
15
15
  var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
16
16
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
17
17
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
18
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
19
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
18
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
19
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
20
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
20
21
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
21
22
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
22
23
  function fulfill(value) { resume("next", value); }
package/dist/cjs/index.js CHANGED
@@ -38,8 +38,9 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
38
38
  var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
39
39
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
40
40
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
41
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
42
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
41
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
42
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
43
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
43
44
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
44
45
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
45
46
  function fulfill(value) { resume("next", value); }
@@ -202,7 +203,27 @@ class FluidTopicsApi {
202
203
  configuration: {
203
204
  reader: `api/configuration/reader`,
204
205
  metadata: `api/configuration/metadata`,
205
- search: `api/configuration/search`
206
+ search: `api/configuration/search`,
207
+ },
208
+ backups: {
209
+ list: `api/backups`,
210
+ backup: (backupId) => ({
211
+ endpoint: `api/backups/${backupId}`,
212
+ download: `api/backups/${backupId}/download`,
213
+ restore: `api/backups/${backupId}/restore`,
214
+ }),
215
+ restoreStatus: (orderId) => ({
216
+ endpoint: `api/backups/restore/${orderId}`,
217
+ }),
218
+ },
219
+ remotePortals: {
220
+ list: `api/remote-portals`,
221
+ portal: (remoteId) => ({
222
+ backups: `api/remote-portals/${remoteId}/backups`,
223
+ backup: (backupId) => ({
224
+ restore: `api/remote-portals/${remoteId}/backups/${backupId}/restore`,
225
+ })
226
+ })
206
227
  },
207
228
  locales: {
208
229
  ui: `api/locales/ui`,
@@ -326,14 +347,14 @@ class FluidTopicsApi {
326
347
  getMapAttachmentContent(mapId, attachmentId, v) {
327
348
  return this.fetchRawData(this.endpoints.khub.maps.mapId(mapId).attachments.attachmentId(attachmentId).content, v);
328
349
  }
329
- getUdAttachments(mapId, v) {
330
- return this.get(this.endpoints.khub.documents.documentId(mapId).attachments.list, v);
350
+ getUdAttachments(documentId, v) {
351
+ return this.get(this.endpoints.khub.documents.documentId(documentId).attachments.list, v);
331
352
  }
332
- getUdAttachment(mapId, attachmentId, v) {
333
- return this.get(this.endpoints.khub.documents.documentId(mapId).attachments.attachmentId(attachmentId).info, v);
353
+ getUdAttachment(documentId, attachmentId, v) {
354
+ return this.get(this.endpoints.khub.documents.documentId(documentId).attachments.attachmentId(attachmentId).info, v);
334
355
  }
335
- getUdAttachmentContent(mapId, attachmentId, v) {
336
- return this.fetchRawData(this.endpoints.khub.documents.documentId(mapId).attachments.attachmentId(attachmentId).content, v);
356
+ getUdAttachmentContent(documentId, attachmentId, v) {
357
+ return this.fetchRawData(this.endpoints.khub.documents.documentId(documentId).attachments.attachmentId(attachmentId).content, v);
337
358
  }
338
359
  getMapResources(mapId, v) {
339
360
  return this.get(this.endpoints.khub.maps.mapId(mapId).resources.list, v);
@@ -445,6 +466,33 @@ class FluidTopicsApi {
445
466
  }
446
467
  return Promise.resolve();
447
468
  }
469
+ downloadBackup(backupId) {
470
+ return this.download("GET", this.endpoints.backups.backup(backupId).download);
471
+ }
472
+ deleteBackup(backupId) {
473
+ return this.delete(this.endpoints.backups.backup(backupId).endpoint);
474
+ }
475
+ listBackups() {
476
+ return this.get(this.endpoints.backups.list);
477
+ }
478
+ createBackup(backupToCreate) {
479
+ return this.post(this.endpoints.backups.list, backupToCreate);
480
+ }
481
+ restoreBackup(backupId, restoreRequest) {
482
+ return this.post(this.endpoints.backups.backup(backupId).restore, restoreRequest);
483
+ }
484
+ getRestoreStatus(orderId) {
485
+ return this.get(this.endpoints.backups.restoreStatus(orderId).endpoint);
486
+ }
487
+ getRemotePortals() {
488
+ return this.get(this.endpoints.remotePortals.list);
489
+ }
490
+ getRemotePortalBackups(remoteId) {
491
+ return this.get(this.endpoints.remotePortals.portal(remoteId).backups);
492
+ }
493
+ restoreRemotePortalBackup(remoteId, backupId) {
494
+ return this.get(this.endpoints.remotePortals.portal(remoteId).backup(backupId).restore);
495
+ }
448
496
  generate(profileId, parameters) {
449
497
  return __asyncGenerator(this, arguments, function* generate_1() {
450
498
  const response = yield __await(this.fetch(this.endpoints.ai.generate, {
@@ -523,8 +571,8 @@ class FluidTopicsApi {
523
571
  return url.replace(this.tenantBaseUrlNoTrailingSlash, "").replace(/^\//, "");
524
572
  }
525
573
  fetch(endpoint, init) {
526
- var _a;
527
574
  return __awaiter(this, void 0, void 0, function* () {
575
+ var _a;
528
576
  const requestInit = init;
529
577
  return yield fetch(this.makeAbsolute(endpoint), Object.assign(Object.assign({}, (requestInit !== null && requestInit !== void 0 ? requestInit : {})), { headers: Object.assign(Object.assign({}, this.defaultHeaders), ((_a = requestInit === null || requestInit === void 0 ? void 0 : requestInit.headers) !== null && _a !== void 0 ? _a : {})) }));
530
578
  });
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addUnauthenticatedUserSearchPreferencesChangeHandler = exports.getUnauthenticatedUserSearchPreferences = exports.setUnauthenticatedUserSearchPreferences = void 0;
3
+ exports.setUnauthenticatedUserSearchPreferences = setUnauthenticatedUserSearchPreferences;
4
+ exports.getUnauthenticatedUserSearchPreferences = getUnauthenticatedUserSearchPreferences;
5
+ exports.addUnauthenticatedUserSearchPreferencesChangeHandler = addUnauthenticatedUserSearchPreferencesChangeHandler;
4
6
  const wnd = (typeof window === "undefined" ? globalThis : window);
5
7
  function normalizeMetadataPreferences(metadata) {
6
8
  let normalized = {};
@@ -39,7 +41,6 @@ function setUnauthenticatedUserSearchPreferences(tenantBaseUrl, input) {
39
41
  }
40
42
  console.error("Cannot set unauthenticated preferences: local storage is unavailable.");
41
43
  }
42
- exports.setUnauthenticatedUserSearchPreferences = setUnauthenticatedUserSearchPreferences;
43
44
  function getUnauthenticatedUserSearchPreferences(tenantBaseUrl) {
44
45
  var _a;
45
46
  if (wnd.localStorage) {
@@ -47,7 +48,6 @@ function getUnauthenticatedUserSearchPreferences(tenantBaseUrl) {
47
48
  }
48
49
  console.error("Cannot get unauthenticated preferences: local storage is unavailable.");
49
50
  }
50
- exports.getUnauthenticatedUserSearchPreferences = getUnauthenticatedUserSearchPreferences;
51
51
  function addUnauthenticatedUserSearchPreferencesChangeHandler(tenantBaseUrl, handler) {
52
52
  if (wnd.localStorage) {
53
53
  const key = getStorageKey(tenantBaseUrl);
@@ -64,4 +64,3 @@ function addUnauthenticatedUserSearchPreferencesChangeHandler(tenantBaseUrl, han
64
64
  }
65
65
  console.error("Cannot handle unauthenticated preferences: local storage is unavailable.");
66
66
  }
67
- exports.addUnauthenticatedUserSearchPreferencesChangeHandler = addUnauthenticatedUserSearchPreferencesChangeHandler;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userHasAllRoles = exports.userHasAnyRole = exports.userHasRole = void 0;
3
+ exports.userHasRole = userHasRole;
4
+ exports.userHasAnyRole = userHasAnyRole;
5
+ exports.userHasAllRoles = userHasAllRoles;
4
6
  const public_js_1 = require("../types/ft-common/public.js");
5
7
  const rolesInheritance = {
6
8
  [public_js_1.FtUserRole.PERSONAL_BOOK_SHARE_USER]: [public_js_1.FtUserRole.PERSONAL_BOOK_USER],
@@ -28,18 +30,15 @@ function userHasRole(sessionOrProfileOrRoles, expectedRole) {
28
30
  : [];
29
31
  return roles.some(role => roleMatches(role, expectedRole));
30
32
  }
31
- exports.userHasRole = userHasRole;
32
33
  function userHasAnyRole(sessionOrProfileOrRoles, ...expectedRoles) {
33
34
  if (sessionOrProfileOrRoles == null) {
34
35
  return false;
35
36
  }
36
37
  return expectedRoles.some(role => userHasRole(sessionOrProfileOrRoles, role));
37
38
  }
38
- exports.userHasAnyRole = userHasAnyRole;
39
39
  function userHasAllRoles(sessionOrProfileOrRoles, ...expectedRoles) {
40
40
  if (sessionOrProfileOrRoles == null) {
41
41
  return false;
42
42
  }
43
43
  return expectedRoles.every(role => userHasRole(sessionOrProfileOrRoles, role));
44
44
  }
45
- exports.userHasAllRoles = userHasAllRoles;
@@ -638,6 +638,7 @@ const isFtUnstructuredDocument = (o) => {
638
638
  && (o.originId == null || isString(o.originId))
639
639
  && (isString(o.rightsApiEndpoint))
640
640
  && (o.originUrl == null || isString(o.originUrl))
641
+ && (isBoolean(o.viewableInCurrentBrowser))
641
642
  && (isString(o.khubVersion))
642
643
  && (isString(o.id))
643
644
  && (o.lang == null || isString(o.lang));
@@ -1,11 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFtPaginatedTocNode = exports.isFtPaginatedToc = exports.isFtPageConfiguration = exports.isFtDocumentAttachment = exports.isFtMapAttachment = exports.isFtTranslationLocale = exports.isFtTranslationResponse = exports.isFtTranslationRequest = exports.isFtTranslationLanguagesResponse = exports.isTranslationFormat = exports.TranslationFormat = exports.isFtGenAIRagTraceUserMessage = exports.isFtGenAIRagTraceSemsearch = exports.isFtGenAIRagTraceDetailHistoryItem = exports.isFtGenAIRagTraceDetail = exports.isFtGenAIRagTraceAssistantMessage = exports.isRagTraceMessageType = exports.RagTraceMessageType = exports.isFtGenAIRagTraceOutput = exports.isFtGenAIRagTraceInput = exports.isFtGenAIRagTraceHistoryItem = exports.isFtGenAIRagTrace = exports.isFtGenAIFetchRagTracesResult = exports.isFtGenAIRagFetchTracesRequest = exports.isFtGenAIGenerationTraceOutput = exports.isFtGenAIGenerationTraceInput = exports.isFtGenAIGenerationTrace = exports.isFtGenAIFetchGenerationTracesResult = exports.isFtGenAIGenerationFetchTracesRequest = exports.isFtRagInput = exports.isFtRagHistory = exports.isFtRagResponseFormat = exports.FtRagResponseFormat = exports.isFtAgentRagChatRequest = exports.isFtAgentResponseFormat = exports.FtAgentResponseFormat = exports.isFtAgentRagChatResponseSource = exports.isFtAgentRagChatResponseFormat = exports.isFtGenAIGenerateInput = exports.isFtGenAIRating = exports.isFtGenAIChatbotUserRating = exports.isFtGenAIChatbotAdminRating = exports.isFtChatbotUserRatingTag = exports.FtChatbotUserRatingTag = exports.isFtChatbotAdminRatingTag = exports.FtChatbotAdminRatingTag = exports.isFtReaderFeedbackConfiguration = exports.isFtReaderConfiguration = exports.isFtConfigurationHistoryEntryStatus = exports.FtConfigurationHistoryEntryStatus = void 0;
4
- exports.isFtAssetHolderType = exports.FtAssetHolderType = exports.isFtAssetHolder = exports.isFtMapResource = exports.isFtAssetDescriptor = exports.isFtUserUiLocaleUpdateRequest = exports.isFtPublicUserReaderPaginationUpdate = exports.isFtPublicUserReaderPaginationSummary = exports.isFtUserLocaleSummary = exports.isFtSemanticSearchRequest = exports.isFtSemanticSearchOrFilter = exports.isFtSemanticSearchNotFilter = exports.isFtSemanticSearchKeyValueFilter = exports.isFtSemanticSearchFilter = exports.isFtSemanticSearchAndFilter = exports.isFtSemanticSearchResponseItem = exports.isFtClusteredSemanticSearchReply = exports.isFtClusteredSemanticSearchRequest = exports.isFtClusteredSemanticSearchCluster = exports.isFtTopicContentFormat = exports.FtTopicContentFormat = exports.isFtPaginationConfiguration = exports.isFtPaginatedTocNodeWithTranslationFailure = void 0;
3
+ exports.isFtPaginatedTocNodeWithTranslationFailure = exports.isFtPaginatedTocNode = exports.isFtPaginatedToc = exports.isFtPageConfiguration = exports.isFtDocumentAttachment = exports.isFtMapAttachment = exports.isFtBackups = exports.isFtBackupRestoreStatusType = exports.FtBackupRestoreStatusType = exports.isFtBackupRestoreOrder = exports.isFtBackupCreation = exports.isFtBackup = exports.isFtTranslationLocale = exports.isFtTranslationResponse = exports.isFtTranslationRequest = exports.isFtTranslationLanguagesResponse = exports.isTranslationFormat = exports.TranslationFormat = exports.isFtGenAIFetchRagTracesResult = exports.isFtGenAIRagFetchTracesRequest = exports.isFtGenAIGenerationTraceOutput = exports.isFtGenAIGenerationTraceInput = exports.isFtGenAIGenerationTrace = exports.isFtGenAIFetchGenerationTracesResult = exports.isFtGenAIGenerationFetchTracesRequest = exports.isFtRagInput = exports.isFtRagHistory = exports.isFtRagResponseFormat = exports.FtRagResponseFormat = exports.isFtAgentRagChatRequest = exports.isFtAgentResponseFormat = exports.FtAgentResponseFormat = exports.isFtAgentRagChatResponseSource = exports.isFtAgentRagChatResponseFormat = exports.isFtGenAIGenerateInput = exports.isFtGenAIRating = exports.isFtGenAIChatbotUserRating = exports.isFtGenAIChatbotAdminRating = exports.isFtChatbotUserRatingTag = exports.FtChatbotUserRatingTag = exports.isFtChatbotAdminRatingTag = exports.FtChatbotAdminRatingTag = exports.isFtReaderFeedbackConfiguration = exports.isFtReaderConfiguration = exports.isFtConfigurationHistoryEntryStatus = exports.FtConfigurationHistoryEntryStatus = exports.isFtRemotePortalStatusType = exports.FtRemotePortalStatusType = exports.isFtRemotePortalStatus = exports.isFtRemotePortal = void 0;
4
+ exports.isFtAssetHolderType = exports.FtAssetHolderType = exports.isFtAssetHolder = exports.isFtMapResource = exports.isFtAssetDescriptor = exports.isFtUserUiLocaleUpdateRequest = exports.isFtPublicUserReaderPaginationUpdate = exports.isFtPublicUserReaderPaginationSummary = exports.isFtUserLocaleSummary = exports.isFtSemanticSearchRequest = exports.isFtSemanticSearchOrFilter = exports.isFtSemanticSearchNotFilter = exports.isFtSemanticSearchKeyValueFilter = exports.isFtSemanticSearchFilter = exports.isFtSemanticSearchAndFilter = exports.isFtSemanticSearchResponseItem = exports.isFtClusteredSemanticSearchReply = exports.isFtClusteredSemanticSearchRequest = exports.isFtClusteredSemanticSearchCluster = exports.isFtSubsetType = exports.FtSubsetType = exports.isFtBackupRestoreRequest = exports.isFtTopicContentFormat = exports.FtTopicContentFormat = exports.isFtPaginationConfiguration = void 0;
5
5
  const isObject = (o) => typeof o === "object" && o != null;
6
6
  const isBoolean = (o) => typeof o === "boolean";
7
7
  const isNumber = (o) => typeof o === "number";
8
8
  const isString = (o) => typeof o === "string";
9
+ const isFtRemotePortal = (o) => {
10
+ return isObject(o)
11
+ && (isString(o.baseUrl))
12
+ && (isString(o.id))
13
+ && ((0, exports.isFtRemotePortalStatus)(o.status));
14
+ };
15
+ exports.isFtRemotePortal = isFtRemotePortal;
16
+ const isFtRemotePortalStatus = (o) => {
17
+ return isObject(o)
18
+ && (o.remoteServerVersion == null || isString(o.remoteServerVersion))
19
+ && ((0, exports.isFtRemotePortalStatusType)(o.status));
20
+ };
21
+ exports.isFtRemotePortalStatus = isFtRemotePortalStatus;
22
+ var FtRemotePortalStatusType;
23
+ (function (FtRemotePortalStatusType) {
24
+ FtRemotePortalStatusType["UNREACHABLE"] = "UNREACHABLE";
25
+ FtRemotePortalStatusType["UNAUTHORIZED"] = "UNAUTHORIZED";
26
+ FtRemotePortalStatusType["FORBIDDEN"] = "FORBIDDEN";
27
+ FtRemotePortalStatusType["INCOMPATIBLE"] = "INCOMPATIBLE";
28
+ FtRemotePortalStatusType["FAILED"] = "FAILED";
29
+ FtRemotePortalStatusType["OK"] = "OK";
30
+ })(FtRemotePortalStatusType || (exports.FtRemotePortalStatusType = FtRemotePortalStatusType = {}));
31
+ const isFtRemotePortalStatusType = (o) => Object.keys(FtRemotePortalStatusType).includes(o);
32
+ exports.isFtRemotePortalStatusType = isFtRemotePortalStatusType;
9
33
  var FtConfigurationHistoryEntryStatus;
10
34
  (function (FtConfigurationHistoryEntryStatus) {
11
35
  FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
@@ -198,90 +222,10 @@ const isFtGenAIFetchRagTracesResult = (o) => {
198
222
  return isObject(o)
199
223
  && (o.endDate == null || isString(o.endDate))
200
224
  && (isNumber(o.nbResults))
201
- && ((Array.isArray(o.results)
202
- && o.results.every((v) => (0, exports.isFtGenAIRagTrace)(v))))
225
+ && ((Array.isArray(o.results)))
203
226
  && (o.startDate == null || isString(o.startDate));
204
227
  };
205
228
  exports.isFtGenAIFetchRagTracesResult = isFtGenAIFetchRagTracesResult;
206
- const isFtGenAIRagTrace = (o) => {
207
- return isObject(o)
208
- && ((0, exports.isFtGenAIRagTraceOutput)(o.output))
209
- && ((0, exports.isFtGenAIRagTraceInput)(o.input))
210
- && (o.conversationId == null || isString(o.conversationId))
211
- && (o.profileId == null || isString(o.profileId))
212
- && (isString(o.id))
213
- && (o.sessionId == null || isString(o.sessionId))
214
- && (o.userId == null || isString(o.userId))
215
- && (isString(o.timestamp));
216
- };
217
- exports.isFtGenAIRagTrace = isFtGenAIRagTrace;
218
- const isFtGenAIRagTraceHistoryItem = (o) => {
219
- return isObject(o)
220
- && (isString(o.role))
221
- && (isString(o.content));
222
- };
223
- exports.isFtGenAIRagTraceHistoryItem = isFtGenAIRagTraceHistoryItem;
224
- const isFtGenAIRagTraceInput = (o) => {
225
- return isObject(o)
226
- && (isString(o.userInstructions))
227
- && (isString(o.query))
228
- && ((Array.isArray(o.history)
229
- && o.history.every((v) => (0, exports.isFtGenAIRagTraceHistoryItem)(v))));
230
- };
231
- exports.isFtGenAIRagTraceInput = isFtGenAIRagTraceInput;
232
- const isFtGenAIRagTraceOutput = (o) => {
233
- return isObject(o)
234
- && (isString(o.response));
235
- };
236
- exports.isFtGenAIRagTraceOutput = isFtGenAIRagTraceOutput;
237
- var RagTraceMessageType;
238
- (function (RagTraceMessageType) {
239
- RagTraceMessageType["USER"] = "USER";
240
- RagTraceMessageType["ASSISTANT"] = "ASSISTANT";
241
- })(RagTraceMessageType || (exports.RagTraceMessageType = RagTraceMessageType = {}));
242
- const isRagTraceMessageType = (o) => Object.keys(RagTraceMessageType).includes(o);
243
- exports.isRagTraceMessageType = isRagTraceMessageType;
244
- const isFtGenAIRagTraceAssistantMessage = (o) => {
245
- return isObject(o)
246
- && (isString(o.chatbotInstructions))
247
- && ((0, exports.isRagTraceMessageType)(o.role))
248
- && ((0, exports.isFtGenAIRagTraceSemsearch)(o.semsearch))
249
- && (isString(o.content))
250
- && (isString(o.timestamp));
251
- };
252
- exports.isFtGenAIRagTraceAssistantMessage = isFtGenAIRagTraceAssistantMessage;
253
- const isFtGenAIRagTraceDetail = (o) => {
254
- return isObject(o)
255
- && (o.profileId == null || isString(o.profileId))
256
- && (o.conversationId == null || isString(o.conversationId))
257
- && (o.sessionId == null || isString(o.sessionId))
258
- && ((Array.isArray(o.history)
259
- && o.history.every((v) => (0, exports.isFtGenAIRagTraceDetailHistoryItem)(v))))
260
- && (o.userId == null || isString(o.userId))
261
- && (o.llmModel == null || isString(o.llmModel))
262
- && (isString(o.timestamp));
263
- };
264
- exports.isFtGenAIRagTraceDetail = isFtGenAIRagTraceDetail;
265
- const isFtGenAIRagTraceDetailHistoryItem = (o) => {
266
- return isObject(o);
267
- };
268
- exports.isFtGenAIRagTraceDetailHistoryItem = isFtGenAIRagTraceDetailHistoryItem;
269
- const isFtGenAIRagTraceSemsearch = (o) => {
270
- return isObject(o)
271
- && (isString(o.query))
272
- && (o.filters == null || (Array.isArray(o.filters)
273
- && o.filters.every((v) => (0, exports.isFtSemanticSearchFilter)(v))))
274
- && ((Array.isArray(o.results)
275
- && o.results.every((v) => (0, exports.isFtSemanticSearchResponseItem)(v))));
276
- };
277
- exports.isFtGenAIRagTraceSemsearch = isFtGenAIRagTraceSemsearch;
278
- const isFtGenAIRagTraceUserMessage = (o) => {
279
- return isObject(o)
280
- && ((0, exports.isRagTraceMessageType)(o.role))
281
- && (isString(o.content))
282
- && (isString(o.timestamp));
283
- };
284
- exports.isFtGenAIRagTraceUserMessage = isFtGenAIRagTraceUserMessage;
285
229
  var TranslationFormat;
286
230
  (function (TranslationFormat) {
287
231
  TranslationFormat["TEXT"] = "TEXT";
@@ -317,6 +261,41 @@ const isFtTranslationLocale = (o) => {
317
261
  && (isString(o.label));
318
262
  };
319
263
  exports.isFtTranslationLocale = isFtTranslationLocale;
264
+ const isFtBackup = (o) => {
265
+ return isObject(o)
266
+ && (isString(o.name))
267
+ && (o.description == null || isString(o.description))
268
+ && (isString(o.id))
269
+ && (isString(o.backupDate))
270
+ && (isBoolean(o.autoBackup));
271
+ };
272
+ exports.isFtBackup = isFtBackup;
273
+ const isFtBackupCreation = (o) => {
274
+ return isObject(o)
275
+ && (isString(o.name))
276
+ && (o.description == null || isString(o.description));
277
+ };
278
+ exports.isFtBackupCreation = isFtBackupCreation;
279
+ const isFtBackupRestoreOrder = (o) => {
280
+ return isObject(o)
281
+ && (isString(o.id))
282
+ && ((0, exports.isFtBackupRestoreStatusType)(o.status));
283
+ };
284
+ exports.isFtBackupRestoreOrder = isFtBackupRestoreOrder;
285
+ var FtBackupRestoreStatusType;
286
+ (function (FtBackupRestoreStatusType) {
287
+ FtBackupRestoreStatusType["IN_PROGRESS"] = "IN_PROGRESS";
288
+ FtBackupRestoreStatusType["ERROR"] = "ERROR";
289
+ FtBackupRestoreStatusType["DONE"] = "DONE";
290
+ })(FtBackupRestoreStatusType || (exports.FtBackupRestoreStatusType = FtBackupRestoreStatusType = {}));
291
+ const isFtBackupRestoreStatusType = (o) => Object.keys(FtBackupRestoreStatusType).includes(o);
292
+ exports.isFtBackupRestoreStatusType = isFtBackupRestoreStatusType;
293
+ const isFtBackups = (o) => {
294
+ return isObject(o)
295
+ && ((Array.isArray(o.backups)
296
+ && o.backups.every((v) => (0, exports.isFtBackup)(v))));
297
+ };
298
+ exports.isFtBackups = isFtBackups;
320
299
  const isFtMapAttachment = (o) => {
321
300
  return isObject(o)
322
301
  && (isString(o.file))
@@ -386,6 +365,41 @@ var FtTopicContentFormat;
386
365
  })(FtTopicContentFormat || (exports.FtTopicContentFormat = FtTopicContentFormat = {}));
387
366
  const isFtTopicContentFormat = (o) => Object.keys(FtTopicContentFormat).includes(o);
388
367
  exports.isFtTopicContentFormat = isFtTopicContentFormat;
368
+ const isFtBackupRestoreRequest = (o) => {
369
+ return isObject(o)
370
+ && (isBoolean(o.createAutoBackup))
371
+ && (o.subsets == null || (Array.isArray(o.subsets)
372
+ && o.subsets.every((v) => (0, exports.isFtSubsetType)(v))));
373
+ };
374
+ exports.isFtBackupRestoreRequest = isFtBackupRestoreRequest;
375
+ var FtSubsetType;
376
+ (function (FtSubsetType) {
377
+ FtSubsetType["SOURCES"] = "SOURCES";
378
+ FtSubsetType["ENRICH_AND_CLEAN"] = "ENRICH_AND_CLEAN";
379
+ FtSubsetType["VOCABULARIES"] = "VOCABULARIES";
380
+ FtSubsetType["METADATA"] = "METADATA";
381
+ FtSubsetType["PRETTY_URL"] = "PRETTY_URL";
382
+ FtSubsetType["ACCESS_RULE"] = "ACCESS_RULE";
383
+ FtSubsetType["DESIGNED_PAGES"] = "DESIGNED_PAGES";
384
+ FtSubsetType["THEME_STUDIO"] = "THEME_STUDIO";
385
+ FtSubsetType["PORTAL_GENERAL"] = "PORTAL_GENERAL";
386
+ FtSubsetType["ASSETS"] = "ASSETS";
387
+ FtSubsetType["CODE_LIBRARY"] = "CODE_LIBRARY";
388
+ FtSubsetType["THEME"] = "THEME";
389
+ FtSubsetType["CONTENT_STYLES"] = "CONTENT_STYLES";
390
+ FtSubsetType["HOMEPAGE"] = "HOMEPAGE";
391
+ FtSubsetType["CLASSIC_SEARCH_PAGE"] = "CLASSIC_SEARCH_PAGE";
392
+ FtSubsetType["CLASSIC_READER_PAGE"] = "CLASSIC_READER_PAGE";
393
+ FtSubsetType["PORTAL_METADATA"] = "PORTAL_METADATA";
394
+ FtSubsetType["LANGUAGES"] = "LANGUAGES";
395
+ FtSubsetType["PRINT_TEMPLATES"] = "PRINT_TEMPLATES";
396
+ FtSubsetType["OFFLINE"] = "OFFLINE";
397
+ FtSubsetType["CUSTOM_JS"] = "CUSTOM_JS";
398
+ FtSubsetType["CONFIDENTIALITY"] = "CONFIDENTIALITY";
399
+ FtSubsetType["NOTIFICATIONS"] = "NOTIFICATIONS";
400
+ })(FtSubsetType || (exports.FtSubsetType = FtSubsetType = {}));
401
+ const isFtSubsetType = (o) => Object.keys(FtSubsetType).includes(o);
402
+ exports.isFtSubsetType = isFtSubsetType;
389
403
  const isFtClusteredSemanticSearchCluster = (o) => {
390
404
  return isObject(o)
391
405
  && (o.maxSize == null || isNumber(o.maxSize));