bruce-models 7.1.56 → 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.
@@ -2809,8 +2809,14 @@ var AccountAudit;
2809
2809
  if (detailLevel) {
2810
2810
  urlParams.append("DetailLevel", detailLevel);
2811
2811
  }
2812
+ if (concept instanceof Array) {
2813
+ urlParams.append("Concept", concept.join(","));
2814
+ }
2815
+ else if (concept) {
2816
+ urlParams.append("Concept", concept);
2817
+ }
2812
2818
  const query = urlParams.toString();
2813
- const route = `v3/accountAudits/concept/${Api.Encode(String(concept))}`;
2819
+ const route = `v3/accountAudits/concepts`;
2814
2820
  return api.GET(query ? `${route}?${query}` : route, Api.PrepReqParams(reqParams));
2815
2821
  });
2816
2822
  }
@@ -5216,6 +5222,7 @@ var EntityAttribute;
5216
5222
  var EntityType;
5217
5223
  (function (EntityType) {
5218
5224
  const EXPORT_ONTOLOGY_ENDPOINT = "entityType/ontology/export";
5225
+ const AI_SUGGEST_ONTOLOGY_OPTIMISATION_ENDPOINT = "entityType/ontology/aiSuggestOptimisation";
5219
5226
  /**
5220
5227
  * Gets an entity type record.
5221
5228
  * @param params
@@ -5526,6 +5533,25 @@ var EntityType;
5526
5533
  });
5527
5534
  }
5528
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;
5529
5555
  /**
5530
5556
  * Starts the background action that suggests Entity Type relations.
5531
5557
  * This calls: POST entityType/relations/findSuggested
@@ -5656,6 +5682,22 @@ var EntityType;
5656
5682
  };
5657
5683
  }
5658
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;
5659
5701
  /**
5660
5702
  * Normalizes response from FindSuggestedRelations.
5661
5703
  * Supports both direct response payloads and wrapper shapes.
@@ -19259,7 +19301,7 @@ var UrlUtils;
19259
19301
  })(UrlUtils || (UrlUtils = {}));
19260
19302
 
19261
19303
  // This is updated with the package.json version on build.
19262
- const VERSION = "7.1.56";
19304
+ const VERSION = "7.1.58";
19263
19305
 
19264
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 };
19265
19307
  //# sourceMappingURL=bruce-models.es5.js.map