bruce-models 7.1.81 → 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.
- package/dist/bruce-models.es5.js +158 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +156 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +3 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +91 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/export/entity-export.js +3 -0
- package/dist/lib/export/entity-export.js.map +1 -0
- package/dist/lib/export/export-csv.js +79 -0
- package/dist/lib/export/export-csv.js.map +1 -0
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/tracking/tracking.js.map +1 -1
- package/dist/lib/user/session.js.map +1 -1
- package/dist/types/bruce-models.d.ts +3 -1
- package/dist/types/data-lab/data-lab.d.ts +83 -1
- package/dist/types/export/entity-export.d.ts +17 -0
- package/dist/types/export/export-csv.d.ts +39 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -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
|
|
@@ -11004,6 +11075,26 @@ var DataLab;
|
|
|
11004
11075
|
});
|
|
11005
11076
|
}
|
|
11006
11077
|
DataLab.Run = Run;
|
|
11078
|
+
/**
|
|
11079
|
+
* Runs one or more DataLab actions.
|
|
11080
|
+
* This calls: POST v3/datalab/runAction
|
|
11081
|
+
*/
|
|
11082
|
+
function RunAction(params) {
|
|
11083
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11084
|
+
let { api, body, req } = params;
|
|
11085
|
+
if (!body) {
|
|
11086
|
+
throw new Error("body is required.");
|
|
11087
|
+
}
|
|
11088
|
+
if (!api) {
|
|
11089
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
11090
|
+
}
|
|
11091
|
+
const res = yield api.POST("v3/datalab/runAction", body, Api.PrepReqParams(req));
|
|
11092
|
+
return {
|
|
11093
|
+
action: res
|
|
11094
|
+
};
|
|
11095
|
+
});
|
|
11096
|
+
}
|
|
11097
|
+
DataLab.RunAction = RunAction;
|
|
11007
11098
|
})(DataLab || (DataLab = {}));
|
|
11008
11099
|
|
|
11009
11100
|
var DataLabGroup;
|
|
@@ -14954,6 +15045,71 @@ var ExportBrz;
|
|
|
14954
15045
|
ExportBrz.Export = Export;
|
|
14955
15046
|
})(ExportBrz || (ExportBrz = {}));
|
|
14956
15047
|
|
|
15048
|
+
var ExportCsv;
|
|
15049
|
+
(function (ExportCsv) {
|
|
15050
|
+
/**
|
|
15051
|
+
* Exports CSV for Entities selected by Filter.
|
|
15052
|
+
* This calls: GET entities/ExportCSV
|
|
15053
|
+
*/
|
|
15054
|
+
function Export(params) {
|
|
15055
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15056
|
+
let { api, fileExport, req } = params;
|
|
15057
|
+
if (!api) {
|
|
15058
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
15059
|
+
}
|
|
15060
|
+
if (!(fileExport === null || fileExport === void 0 ? void 0 : fileExport.BruceEntityType)) {
|
|
15061
|
+
throw ("fileExport.BruceEntityType is required.");
|
|
15062
|
+
}
|
|
15063
|
+
const urlParams = new URLSearchParams();
|
|
15064
|
+
urlParams.append("BruceEntityType", fileExport.BruceEntityType);
|
|
15065
|
+
appendStringParam(urlParams, "OrderBy", fileExport.OrderBy);
|
|
15066
|
+
appendStringParam(urlParams, "SortOrder", fileExport.SortOrder);
|
|
15067
|
+
appendStringParam(urlParams, "Filter", fileExport.Filter);
|
|
15068
|
+
appendStringParam(urlParams, "LODType", fileExport.LODType);
|
|
15069
|
+
if (fileExport.ZIP != null) {
|
|
15070
|
+
urlParams.append("ZIP", String(fileExport.ZIP));
|
|
15071
|
+
}
|
|
15072
|
+
if (fileExport.ColumnSettings) {
|
|
15073
|
+
urlParams.append("ColumnSettings", JSON.stringify(fileExport.ColumnSettings));
|
|
15074
|
+
}
|
|
15075
|
+
return api.GET(`entities/ExportCSV?${urlParams.toString()}`, Api.PrepReqParams(req));
|
|
15076
|
+
});
|
|
15077
|
+
}
|
|
15078
|
+
ExportCsv.Export = Export;
|
|
15079
|
+
/**
|
|
15080
|
+
* Exports CSV for a provided list of Entity IDs.
|
|
15081
|
+
* This calls: POST entities/ExportCSV/{entityType_ID}
|
|
15082
|
+
*/
|
|
15083
|
+
function ExportEntities(params) {
|
|
15084
|
+
var _a;
|
|
15085
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15086
|
+
let { api, entityTypeId, fileExport, zip, req } = params;
|
|
15087
|
+
if (!api) {
|
|
15088
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
15089
|
+
}
|
|
15090
|
+
if (!entityTypeId) {
|
|
15091
|
+
throw ("entityTypeId is required.");
|
|
15092
|
+
}
|
|
15093
|
+
if (!((_a = fileExport === null || fileExport === void 0 ? void 0 : fileExport.EntityIDs) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
15094
|
+
throw ("fileExport.EntityIDs is required and must be a non-empty list.");
|
|
15095
|
+
}
|
|
15096
|
+
let url = `entities/ExportCSV/${Api.Encode(entityTypeId)}`;
|
|
15097
|
+
if (zip != null) {
|
|
15098
|
+
const urlParams = new URLSearchParams();
|
|
15099
|
+
urlParams.append("ZIP", String(zip));
|
|
15100
|
+
url += `?${urlParams.toString()}`;
|
|
15101
|
+
}
|
|
15102
|
+
return api.POST(url, fileExport, Api.PrepReqParams(req));
|
|
15103
|
+
});
|
|
15104
|
+
}
|
|
15105
|
+
ExportCsv.ExportEntities = ExportEntities;
|
|
15106
|
+
function appendStringParam(urlParams, key, value) {
|
|
15107
|
+
if (value != null && value !== "") {
|
|
15108
|
+
urlParams.append(key, String(value));
|
|
15109
|
+
}
|
|
15110
|
+
}
|
|
15111
|
+
})(ExportCsv || (ExportCsv = {}));
|
|
15112
|
+
|
|
14957
15113
|
var ExportUsd;
|
|
14958
15114
|
(function (ExportUsd) {
|
|
14959
15115
|
function Export(params) {
|
|
@@ -20617,7 +20773,7 @@ var UrlUtils;
|
|
|
20617
20773
|
})(UrlUtils || (UrlUtils = {}));
|
|
20618
20774
|
|
|
20619
20775
|
// This is updated with the package.json version on build.
|
|
20620
|
-
const VERSION = "7.1.
|
|
20776
|
+
const VERSION = "7.1.83";
|
|
20621
20777
|
|
|
20622
|
-
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, 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 };
|
|
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 };
|
|
20623
20779
|
//# sourceMappingURL=bruce-models.es5.js.map
|