bruce-models 7.1.82 → 7.1.83

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.
@@ -10870,6 +10870,24 @@ function parseObject$2(data) {
10870
10870
  */
10871
10871
  var DataLab;
10872
10872
  (function (DataLab) {
10873
+ /**
10874
+ * What a search returns, as opposed to which Entities it matches.
10875
+ */
10876
+ let ESelectType;
10877
+ (function (ESelectType) {
10878
+ // Whole Entity records. This is the default.
10879
+ ESelectType["Entity"] = "ENTITY";
10880
+ // Just the Entity IDs.
10881
+ ESelectType["Id"] = "ID";
10882
+ // The distinct Entity Type IDs of the matches, rather than the matches themselves.
10883
+ ESelectType["EntityTypeId"] = "ENTITY_TYPE_ID";
10884
+ // The internal (Bruce) attributes at the root of each record.
10885
+ ESelectType["Internal"] = "Bruce";
10886
+ // A calculation described by Output.
10887
+ ESelectType["Calc"] = "CALC";
10888
+ // A data schema built from the matches.
10889
+ ESelectType["DataSchema"] = "DATA_SCHEMA";
10890
+ })(ESelectType = DataLab.ESelectType || (DataLab.ESelectType = {}));
10873
10891
  let EReqKey;
10874
10892
  (function (EReqKey) {
10875
10893
  EReqKey["Primary"] = "PrimarySelection";
@@ -10956,6 +10974,59 @@ var DataLab;
10956
10974
  });
10957
10975
  }
10958
10976
  DataLab.SuggestDataLabQueryByPrompt = SuggestDataLabQueryByPrompt;
10977
+ /**
10978
+ * Runs a DataLab query for the distinct Entity Type IDs of everything it matches.
10979
+ */
10980
+ function GetEntityTypeIds(params) {
10981
+ return __awaiter(this, void 0, void 0, function* () {
10982
+ let { api, query, skip, load, req: reqParams } = params;
10983
+ if (!api) {
10984
+ api = ENVIRONMENT.Api().GetBruceApi();
10985
+ }
10986
+ if (!(query === null || query === void 0 ? void 0 : query[EReqKey.Primary])) {
10987
+ throw new Error("query must carry a PrimarySelection.");
10988
+ }
10989
+ skip = skip !== null && skip !== void 0 ? skip : 0;
10990
+ load = load !== null && load !== void 0 ? load : 200;
10991
+ // Cloned so asking this question of a query never changes what the caller goes on to run.
10992
+ const body = Object.assign(Object.assign({}, query), { [EReqKey.Primary]: Object.assign(Object.assign({}, query[EReqKey.Primary]), { Select: { Type: ESelectType.EntityTypeId } }), Skip: skip, Load: load });
10993
+ const res = yield api.POST("v3/datalab/runSearch", body, Api.PrepReqParams(reqParams));
10994
+ return {
10995
+ entityTypeIds: Array.isArray(res === null || res === void 0 ? void 0 : res.Items) ? res.Items : [],
10996
+ hasMore: Boolean(res === null || res === void 0 ? void 0 : res.NextPage)
10997
+ };
10998
+ });
10999
+ }
11000
+ DataLab.GetEntityTypeIds = GetEntityTypeIds;
11001
+ /**
11002
+ * Returns the distinct Entity Type IDs used inside one or more assembly hierarchies.
11003
+ * The root Entity's own Type is included, since it is part of the hierarchy.
11004
+ */
11005
+ function GetAssemblyEntityTypeIds(params) {
11006
+ return __awaiter(this, void 0, void 0, function* () {
11007
+ const { api, rootEntityId, skip, load, req } = params;
11008
+ const rootIds = Array.isArray(rootEntityId) ? rootEntityId : [rootEntityId];
11009
+ if (!rootIds.length || rootIds.some(id => !id)) {
11010
+ throw new Error("rootEntityId must be provided.");
11011
+ }
11012
+ const criterion = {
11013
+ key: "root",
11014
+ RootID: rootIds
11015
+ };
11016
+ return GetEntityTypeIds({
11017
+ api,
11018
+ skip,
11019
+ load,
11020
+ req,
11021
+ query: {
11022
+ [EReqKey.Primary]: {
11023
+ Items: [criterion]
11024
+ }
11025
+ }
11026
+ });
11027
+ });
11028
+ }
11029
+ DataLab.GetAssemblyEntityTypeIds = GetAssemblyEntityTypeIds;
10959
11030
  /**
10960
11031
  * Runs a DataLab query.
10961
11032
  * @param params
@@ -20702,7 +20773,7 @@ var UrlUtils;
20702
20773
  })(UrlUtils || (UrlUtils = {}));
20703
20774
 
20704
20775
  // This is updated with the package.json version on build.
20705
- const VERSION = "7.1.82";
20776
+ const VERSION = "7.1.83";
20706
20777
 
20707
20778
  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, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportedFile, Uploader, Markup, UIMarkup, 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 };
20708
20779
  //# sourceMappingURL=bruce-models.es5.js.map