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.
- package/dist/bruce-models.es5.js +72 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +72 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/data-lab/data-lab.js +71 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- 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 +1 -1
- package/dist/types/data-lab/data-lab.d.ts +46 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -10740,6 +10740,24 @@
|
|
|
10740
10740
|
}
|
|
10741
10741
|
|
|
10742
10742
|
(function (DataLab) {
|
|
10743
|
+
/**
|
|
10744
|
+
* What a search returns, as opposed to which Entities it matches.
|
|
10745
|
+
*/
|
|
10746
|
+
let ESelectType;
|
|
10747
|
+
(function (ESelectType) {
|
|
10748
|
+
// Whole Entity records. This is the default.
|
|
10749
|
+
ESelectType["Entity"] = "ENTITY";
|
|
10750
|
+
// Just the Entity IDs.
|
|
10751
|
+
ESelectType["Id"] = "ID";
|
|
10752
|
+
// The distinct Entity Type IDs of the matches, rather than the matches themselves.
|
|
10753
|
+
ESelectType["EntityTypeId"] = "ENTITY_TYPE_ID";
|
|
10754
|
+
// The internal (Bruce) attributes at the root of each record.
|
|
10755
|
+
ESelectType["Internal"] = "Bruce";
|
|
10756
|
+
// A calculation described by Output.
|
|
10757
|
+
ESelectType["Calc"] = "CALC";
|
|
10758
|
+
// A data schema built from the matches.
|
|
10759
|
+
ESelectType["DataSchema"] = "DATA_SCHEMA";
|
|
10760
|
+
})(ESelectType = DataLab.ESelectType || (DataLab.ESelectType = {}));
|
|
10743
10761
|
let EReqKey;
|
|
10744
10762
|
(function (EReqKey) {
|
|
10745
10763
|
EReqKey["Primary"] = "PrimarySelection";
|
|
@@ -10826,6 +10844,59 @@
|
|
|
10826
10844
|
});
|
|
10827
10845
|
}
|
|
10828
10846
|
DataLab.SuggestDataLabQueryByPrompt = SuggestDataLabQueryByPrompt;
|
|
10847
|
+
/**
|
|
10848
|
+
* Runs a DataLab query for the distinct Entity Type IDs of everything it matches.
|
|
10849
|
+
*/
|
|
10850
|
+
function GetEntityTypeIds(params) {
|
|
10851
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10852
|
+
let { api, query, skip, load, req: reqParams } = params;
|
|
10853
|
+
if (!api) {
|
|
10854
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
10855
|
+
}
|
|
10856
|
+
if (!(query === null || query === void 0 ? void 0 : query[EReqKey.Primary])) {
|
|
10857
|
+
throw new Error("query must carry a PrimarySelection.");
|
|
10858
|
+
}
|
|
10859
|
+
skip = skip !== null && skip !== void 0 ? skip : 0;
|
|
10860
|
+
load = load !== null && load !== void 0 ? load : 200;
|
|
10861
|
+
// Cloned so asking this question of a query never changes what the caller goes on to run.
|
|
10862
|
+
const body = Object.assign(Object.assign({}, query), { [EReqKey.Primary]: Object.assign(Object.assign({}, query[EReqKey.Primary]), { Select: { Type: ESelectType.EntityTypeId } }), Skip: skip, Load: load });
|
|
10863
|
+
const res = yield api.POST("v3/datalab/runSearch", body, exports.Api.PrepReqParams(reqParams));
|
|
10864
|
+
return {
|
|
10865
|
+
entityTypeIds: Array.isArray(res === null || res === void 0 ? void 0 : res.Items) ? res.Items : [],
|
|
10866
|
+
hasMore: Boolean(res === null || res === void 0 ? void 0 : res.NextPage)
|
|
10867
|
+
};
|
|
10868
|
+
});
|
|
10869
|
+
}
|
|
10870
|
+
DataLab.GetEntityTypeIds = GetEntityTypeIds;
|
|
10871
|
+
/**
|
|
10872
|
+
* Returns the distinct Entity Type IDs used inside one or more assembly hierarchies.
|
|
10873
|
+
* The root Entity's own Type is included, since it is part of the hierarchy.
|
|
10874
|
+
*/
|
|
10875
|
+
function GetAssemblyEntityTypeIds(params) {
|
|
10876
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10877
|
+
const { api, rootEntityId, skip, load, req } = params;
|
|
10878
|
+
const rootIds = Array.isArray(rootEntityId) ? rootEntityId : [rootEntityId];
|
|
10879
|
+
if (!rootIds.length || rootIds.some(id => !id)) {
|
|
10880
|
+
throw new Error("rootEntityId must be provided.");
|
|
10881
|
+
}
|
|
10882
|
+
const criterion = {
|
|
10883
|
+
key: "root",
|
|
10884
|
+
RootID: rootIds
|
|
10885
|
+
};
|
|
10886
|
+
return GetEntityTypeIds({
|
|
10887
|
+
api,
|
|
10888
|
+
skip,
|
|
10889
|
+
load,
|
|
10890
|
+
req,
|
|
10891
|
+
query: {
|
|
10892
|
+
[EReqKey.Primary]: {
|
|
10893
|
+
Items: [criterion]
|
|
10894
|
+
}
|
|
10895
|
+
}
|
|
10896
|
+
});
|
|
10897
|
+
});
|
|
10898
|
+
}
|
|
10899
|
+
DataLab.GetAssemblyEntityTypeIds = GetAssemblyEntityTypeIds;
|
|
10829
10900
|
/**
|
|
10830
10901
|
* Runs a DataLab query.
|
|
10831
10902
|
* @param params
|
|
@@ -20339,7 +20410,7 @@
|
|
|
20339
20410
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
20340
20411
|
|
|
20341
20412
|
// This is updated with the package.json version on build.
|
|
20342
|
-
const VERSION = "7.1.
|
|
20413
|
+
const VERSION = "7.1.83";
|
|
20343
20414
|
|
|
20344
20415
|
exports.VERSION = VERSION;
|
|
20345
20416
|
exports.AbstractApi = AbstractApi;
|