bruce-models 7.1.57 → 7.1.58

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.
@@ -5222,6 +5222,7 @@ var EntityAttribute;
5222
5222
  var EntityType;
5223
5223
  (function (EntityType) {
5224
5224
  const EXPORT_ONTOLOGY_ENDPOINT = "entityType/ontology/export";
5225
+ const AI_SUGGEST_ONTOLOGY_OPTIMISATION_ENDPOINT = "entityType/ontology/aiSuggestOptimisation";
5225
5226
  /**
5226
5227
  * Gets an entity type record.
5227
5228
  * @param params
@@ -5532,6 +5533,25 @@ var EntityType;
5532
5533
  });
5533
5534
  }
5534
5535
  EntityType.ExportOntology = ExportOntology;
5536
+ /**
5537
+ * Suggests an optimized ontology using the account's configured AI provider.
5538
+ * This calls: POST entityType/ontology/aiSuggestOptimisation
5539
+ */
5540
+ function AISuggestOntologyOptimisation(params) {
5541
+ var _a;
5542
+ return __awaiter(this, void 0, void 0, function* () {
5543
+ let { api, ontologyOptimisationRequest, req } = params;
5544
+ if (!((_a = ontologyOptimisationRequest === null || ontologyOptimisationRequest === void 0 ? void 0 : ontologyOptimisationRequest["EntityType.ID"]) === null || _a === void 0 ? void 0 : _a.length)) {
5545
+ throw ("EntityType.ID is required.");
5546
+ }
5547
+ if (!api) {
5548
+ api = ENVIRONMENT.Api().GetBruceApi();
5549
+ }
5550
+ const res = yield api.POST(AI_SUGGEST_ONTOLOGY_OPTIMISATION_ENDPOINT, ontologyOptimisationRequest, req ? Api.PrepReqParams(req) : undefined);
5551
+ return ParseAISuggestOntologyOptimisationResponse(res);
5552
+ });
5553
+ }
5554
+ EntityType.AISuggestOntologyOptimisation = AISuggestOntologyOptimisation;
5535
5555
  /**
5536
5556
  * Starts the background action that suggests Entity Type relations.
5537
5557
  * This calls: POST entityType/relations/findSuggested
@@ -5662,6 +5682,22 @@ var EntityType;
5662
5682
  };
5663
5683
  }
5664
5684
  EntityType.ParseExportOntologyResponse = ParseExportOntologyResponse;
5685
+ /**
5686
+ * Normalizes response from AISuggestOntologyOptimisation.
5687
+ * Supports direct response payloads and wrapper shapes.
5688
+ */
5689
+ function ParseAISuggestOntologyOptimisationResponse(response) {
5690
+ var _a, _b, _c, _d;
5691
+ const parsed = parseObject$1(response);
5692
+ const parsedResult = (_a = parseObject$1(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
5693
+ return {
5694
+ ontologyExport: (_b = parsed === null || parsed === void 0 ? void 0 : parsed.OntologyExport) !== null && _b !== void 0 ? _b : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.OntologyExport,
5695
+ existingEntityTypes: (_c = parsed === null || parsed === void 0 ? void 0 : parsed.ExistingEntityTypes) !== null && _c !== void 0 ? _c : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.ExistingEntityTypes,
5696
+ suggestion: (_d = parsed === null || parsed === void 0 ? void 0 : parsed.Suggestion) !== null && _d !== void 0 ? _d : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.Suggestion,
5697
+ raw: parsed
5698
+ };
5699
+ }
5700
+ EntityType.ParseAISuggestOntologyOptimisationResponse = ParseAISuggestOntologyOptimisationResponse;
5665
5701
  /**
5666
5702
  * Normalizes response from FindSuggestedRelations.
5667
5703
  * Supports both direct response payloads and wrapper shapes.
@@ -19265,7 +19301,7 @@ var UrlUtils;
19265
19301
  })(UrlUtils || (UrlUtils = {}));
19266
19302
 
19267
19303
  // This is updated with the package.json version on build.
19268
- const VERSION = "7.1.57";
19304
+ const VERSION = "7.1.58";
19269
19305
 
19270
19306
  export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeTrigger, ENVIRONMENT, ExportBrz, ExportUsd, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportedFile, Uploader, Markup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
19271
19307
  //# sourceMappingURL=bruce-models.es5.js.map